Classes Considered Harmful [pdf]
web.cecs.pdx.edu
Classes Considered Harmful [pdf]
1–10 of 129 posts
Re: Classes Considered Harmful [pdf]
#2- NewtonScript's frames with prototype inheritance. Allows "objects" to consist of very small data structures that point to ROM objects and only use RAM for slots that actually vary, using copy-on-write. The actual implementation had some issues and of course that platform is dead, but the concept was great.
- Dylan's adaptation of generic functions, with multiple inheritance. There are classes but they don't have methods "inside" them. The class hierarchy describes the dispatch for the generic functions. Allows some really nice styles of programming (dispatching on multiple parameters) that are perhaps possible but absolutely hideous in C++.
- Qt's method. The use of a separate preprocessor step and generated code for dispatch was a hack to get around limitations of C++, but although you don't want to look too closely at that generated code if you value your sanity, at a practical level it works pretty well.
In summary, I'd just add that it is a deep and abiding shame of my industry that people wind up in silos learning one model of object-oriented programming and never consider other models that are different and can be cleaner and far simpler to think about.
Re: Classes Considered Harmful [pdf]
#3NOOL seems to stand for "New Object-Oriented Languages", a workshop of the ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH).
Re: Classes Considered Harmful [pdf]
#4Re: Classes Considered Harmful [pdf]
#5Re: Classes Considered Harmful [pdf]
#6I guess "Classes considered a PITA" just didn't make a good title.
Re: Classes Considered Harmful [pdf]
#7For what it's worth, the footer reads, "Submission to NOOL / 2015/10/12". NOOL seems to stand for "New Object-Oriented Languages", a workshop of the ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH). http://2016.splashcon.org/home http://2016.splashcon.org/track/nool2016
Re: Classes Considered Harmful [pdf]
#8The answer, of course, was inheritance, and once the question was asked it wasn't hard to see how much better life could be without it. I've been on an anti-inheritance kick ever since.
Now I see how much better life can be without OO entirely, but that's a different discussion.
Re: Classes Considered Harmful [pdf]
#9There seems to be a common fixation on objects "modeling the real world" with the counter argument for classes being that they don't model the real world. True, there isn't a physical chair class in real life(philosophically, there aren't even chairs), but there is a common abstract idea of what would describe the function and attributes of a chair. Granted, it differs a little from person to person, but objects them…
That there is no precise definition of what a class is and isn't, and that the traditional notion of a class conflates several independent concepts, is precisely the big criticism! To my mind "traditional classes" means inheritance, and recent languages without inheritance (Rust or Go) have tended to not use the term "class".