4 ms·
Again, I was referring to user defined types (not primitive types), which are not classes.
by dgan 4y ago
Again, I was referring to user defined types (not primitive types), which are not classes.
- pipeline_peak 4y ago> A class specified by the keyword class, is a user defined type that contains both data members and member functions... http://www.cs.fsu.edu/~cop3014p/lectures/ch8/index.html http://www.cs.fsu.edu/~cop3014p/lectures/ch8/index.html
- dgan 4y ago? Okey? module Example type mytype val id: mytype -> mytype end = struct type mytype = { position:(int * int) } type othertype = int let id self = self end ``` How many classes I have defined? Exactly zero. How many types I have defined? Definetely not zero. One of these types is secretly equivalent to a primitive type, while the other is not, and none of this is known to users of these types. I am not sure why keep trying to show "class = type". It is wrong, those are different concepts. I don't care what c++ says