News for hackers. Stuff that matters.
Re:When FP? And When OOP? (2013) by YorkshireSeason on Monday January 28, 2019 @08:00AM (#19017093)
Use Scala -- first class support for objects and ADTs.
Re:When FP? And When OOP? (2013) by mcintyre1994 on Monday January 28, 2019 @09:01AM (#19017434)
But not for that syntax unfortunately, unless I'm missing it? I use sealed traits and case classes to do the same - the union syntax would be much nicer.
Re:When FP? And When OOP? (2013) by virtualwhys on Monday January 28, 2019 @09:30AM (#19017624)
Coming in Dotty/Scala 3.0, along with a slew of other improvements to the language.

Combine that with the proposed new enum syntax and existing sealed trait plus case class/object boilerplate will be gone. Looks pretty great, but we'll have to wait until next year sometime to use it in production.