News for hackers. Stuff that matters.
Re:Stop writing classes... by sixbrx on Sunday March 18, 2012 @11:53AM (#3719936)
I think there is no question that being able to define new types is important. I don't, however think it's clear that having to pack operations that operate on the types into the types themselves is a good idea in general. Your example is easily handled with a simple type class in Haskell e.g., and no there's it's not "essentially a class" in the OO sense, as new operations can be freely added without modifying the type itself.
Re:Stop writing classes... by colomon on Sunday March 18, 2012 @06:07PM (#3721162)
Er, I've never used a OO language that didn't allow you to add new operations freely without modifying a class. Not all of them allow you to add new methods, sure, but new functions and operators are par for the course.

And surely you're not arguing the defining feature of a class is that it's closed?