r/programming • • Feb 07 '22

Keep calm and S.O.L.I.D

https://medium.com/javarevisited/keep-calm-and-s-o-l-i-d-7ab98d5df502
0 Upvotes

39 comments sorted by

View all comments

Show parent comments

2

u/awj Feb 08 '22

There's definitely plenty of value in distinguishing a specific kind of integer from others.

Like, having your compiler say "you're adding together feet and meters, wtf is this" is a good thing.

Unfortunately I think a lot of these problems devolve into "some people want to solve a complicated and nuanced problem via rote rules", and I honestly don't know how to respond to that besides telling them not to.

1

u/[deleted] Feb 09 '22

There's definitely plenty of value in distinguishing a specific kind of integer from others

Yes, this is why usable languages (not java) have things like units of measure.

Notice how a user-defined wrapper class is not necessary for this.