3 ms·
You... don't really think Stroustrup invented the term "class", do you? :)
by zzalpha 9y ago
You... don't really think Stroustrup invented the term "class", do you? :)
- dualogy 9y agoOf course not but that sort of meaning for the term class was GP's point here
- zzalpha 9y agoAnd my point is that that usage of the term predates Stroustrup by 10 solid years. By the time Haskell was first released, OOP was either already available in popular languages (Smalltalk, Object Pascal) or being introduced into existing languages (Objective C, C++, Lisp). In hindsight it would appear there was no reason not to see that OOP was gaining in popularity, that the term "class" was already in use, and that overloading it would be confusing. That said, in the end, all my original post was lamenting is that it's a shame that Haskell terminology went the way it did... it's just yet another aspect of the language that creates confusion among newcomers, and it already has enough of that already! :)
- iainmerrick 9y agoI don't think the creators of Haskell were concerned even slightly with trying to fit in with trends in imperative languages. They were doing their own thing (or at least, trying to make a research-friendly version of David Turner's commercial language Miranda).
- zzalpha 9y agoYour explanation does not justify the choice. They were tasked with communicating with other academics who were already using the term "class" in the field of programming language research.
- mitchty 9y agoTo be blunt, it doesn't need to be justified. Should I call cars horseless carriages simply because that was the original term? Have you seen how bad the situation is in mathematics where the exact same concept has multiple names? This isn't a unique thing to have happen. Nor one to fret this much over. The haskell committee were concerned with conveying knowledge amongst functional programming researchers. The use of class in similar but unrelated fields doesn't mean everyone need use it.
- harry8 9y agoIf you call a fish a "car" don't be surprised when people get confused and think that choice of name was ill-advised. Car is already in use, don't use car to describe a fish, it's not difficult. When a word has an accepted meaning, using that word to convey an entirely different meaning where you could easily choose something else is ridiculous. It is right to criticise anyone who does something so silly. Or you can think I'm just flying the mountain with ice cream windows if you like.
- iainmerrick 9y agoIt depends whether you care about catering to a general audience. Lisp got away with an entirely different meaning for “car” for a pretty long time!
- HelloNurse 9y agoBut classes in the traditional OOP sense are types of values, while Haskell typeclasses are types of types. There is no opportunity for confusion.