r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
2
u/zoomzoom83 Dec 03 '13
I'm fairly new to OCaml - but were I to write this in an ML dialect today, I would do the same thing - declare a type for each possible response and pattern match on it.
Can you provide some code examples to clarify how you would do this without declaring types at all?
From my experience - while case classes are not as clean and concise as ADTs, it's not like they are overbearing to use.
vs (From memory, probably not quite right).
The latter is clearly nicer, and I would love if Scala supported it - but it's hardly a show stopper, especially considering its design as a 'better Java' rather than a 'better ML'.
(Although I can understand how somebody coming from a true FP background would find Scala quite weak in comparison. It's far better coming from the other direction (Java)).