> The advantage isn't that it prevents you from using a floating point where an integer was required. The advantage is that it enables you to model domain logic in a way that flushes out all sorts of edge cases at compile time.https://blog.ploeh.dk/2020/01/20/algebraic-data-types-arent-numbers-on-steroids/ …
-
-
But why not use the type system to give you *both* :) ADTs aren't numbers on steroids - but newtypes are!
-
fair point! except that for me personally newtypes more often are "strings on steroids" I think
Kraj razgovora
Novi razgovor -
-
-
Great article. Very much in the theme of this wonderful talk aimed at beginners which I try to get all new folks on my team to watch, even though we work in Scala: https://www.youtube.com/watch?v=R2afqbzWDiU … Talk is Elm/Haskell.
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.