3 ms·
The natural language is evolved by people saying what they what and the majority became the language. Not defined by some elites or some authority. Classes bin
by cttet 5y ago
The natural language is evolved by people saying what they what and the majority became the language. Not defined by some elites or some authority.
Classes binds data and functions together, and object systems supports inheritance. These are some of the things that some people don't really like, but you may not care. People sometimes care about syntax as well, writing "Class" is also part of the experience of using the language.
We have different words in the language for a purpose, that's my opinion.
- pjmlp 5y agoModules also bind data and functions together. Not all object systems use inheritance, and even those that do, we can speak about delegation, interface/trait/protocols/type classes inheritance, regular classes inheritance, or some weird stuff like object patterns from BETA. That is why we have CS literature, to put the right words in place.
- cttet 5y ago| Modules also bind data and functions together. Yep, but a module is still not a Class. My example was referring to you mixing concepts of Classes and Polymorphism and dynamic dispatch in your original reply. As you said, there are a lot of object systems that are different, and the difference matters. Having inheritance or not matters. I was just making examples to show that things are different. We all know that C++ concepts != go/typescript interfaces != Java/c# interfaces != Haskell type classes (c# concepts) != rust/scala traits. Try to explain that using "CS literature", maybe a lot of language designs don't have a word yet made for that. Yep there are Subtyping, Bounded quantification, Ad hoc polymorphism, Row polymorphism, but still not enough to tell all of them from each other. But to anyone in the community, people all know that they are all not Classes and what make them special is important. It is quite clear, but why don't you get that? The concepts CS literature are quite trivial and people can spend a few weekends to learn, or maybe another few for type rule syntax or a few others for basic category theory to understand them in a more intuitive way. But the real problem of making a good language for some applications is still there and much more complex and difficult. And maybe current literature are not enough for that. The elites will never dictate the words, the people will pick up whatever they want to express their knowledge anyway, as we know of what happened in history.