News for hackers. Stuff that matters.
Re:Ask HN: OOP in Functional Programming Language by dave4420 on Wednesday January 19, 2022 @11:54AM (#29996232)
Case classes in Scala? (Although traditional imperative classes are also available, so maybe this doesn’t count as encouraging your desired style.)
Re:Ask HN: OOP in Functional Programming Language by mollerhoj on Wednesday January 19, 2022 @12:25PM (#29996684)
Thanks, that's pretty much exactly what I was looking for. Very interesting. Are these commonly used in Scala code? It seems that they do away with some of the boilerplate code (in the constructor) and provides some rather nice features. I guess the inventors of Scala has been thinking along similar lines as me ;-)
Re:Ask HN: OOP in Functional Programming Language by 0x008 on Thursday January 20, 2022 @02:03PM (#30013118)
Yes they are used all the time and every time data has to be represented.