2 ms·
I know it is. That's not the point. The point is that you need to know CLOS with its many rules to understand many CL code bases, just like you need to understa
by tsimionescu 5y ago
I know it is. That's not the point. The point is that you need to know CLOS with its many rules to understand many CL code bases, just like you need to understand C++ classes.
The fact that C++ classes are part of the C++ core langauge while CLOS is a library doesn't really change this aspect.
- mrcode007 5y agoI agree with the claim that knowing CLOS is useful to read code bases. Where I think we differ is that I don’t consider CLOS a part of the language itself. I consider it a part of a particular implementation of the language. You can be a fluent and prolific CL programmer without ever writing any code that relies on CLOS, defstruct or defclass, etc. The big difference between C++ and CL in this particular instance is that you can’t write C++ without writing or using classes/structs. For example, using STL almost always involves using or writing custom comparator “classes”. Even if you choose to go with lambdas, the whole concept of a container is object oriented. In CL, you can, if you want, stick with lists all the way down without ever touching defclass/defstruct at all. An equivalent abstraction level of the C++ code would only use integral data types. Whereas in CL those types are part of the language.