News for hackers. Stuff that matters.
Re:Making Wrong Code Look Wrong (2005) by eloisant on Saturday November 09, 2019 @06:13AM (#21490831)
Actually it can, you just have to define types for it.

In Scala you have value class, that get replaced by the underlying type during compilation so there is no overhead.

https://ivanyu.me/blog/2014/12/14/value-classes-in-scala/

It may sounds a hassle but you only have to handle it at the interfaces (for example for a web app in the controller and data layer), in the rest of the code you just manipulate your value like any other type.

There are no comments on this comment yet.