6 ms·
One thing bad is the word 'class'. What it is supposed to even mean? It was some fancy concept by stupid Normen when defining Simula. My Simula teacher said tha
by timonoko 4y ago
One thing bad is the word 'class'. What it is supposed to even mean? It was some fancy concept by stupid Normen when defining Simula. My Simula teacher said that you could just translate it as "design" as in "design of car and its implementation".
Anyways Python's "class" is even worse:
class c: a=10
print c.a
c.a=13
print c.a
I cannot think any English word to replace the "class". The word I am thinking of could be translated as "box". "Box of things and improved versions of it".
- Avicebron 4y agomaybe superset or subset works as a translation? (in the math sense superset).
- retrac 4y ago"Object"? Though that creates ambiguity between definition and instances of the definition.
- miroljub 4y agoYou just nailed it :) Maybe instead of "Class" and "Object" we should use "Definition" and "Instance".
- dreamcompiler 4y agoIn CLOS, all classes are instances but not all instances are classes. It just so happens that the object that describes a class's slots, inheritance, etc is ... an instance. Of what? A metaclass. Which is also an instance. It's confusing at first but eventually it all gels.
- _old_dude_ 4y ago"mold", but the mold is also an instance of a mold. i = c() print(i.a) i.a = 42 print(i.a)
- Koshkin 4y agoEven C++ does not need ‘class,’ as it already has ‘struct’ that it inherited from C. (A saner language would just use the word ‘type.’)
- usrusr 4y agoOr as it's lived in all of java culture (and beyond) that isn't infested by that very special thought universe that exists around the landmarks of j2ee, "beans" and the spring framework, "classes" are just namespaces for organising your code that may or may not also happen to identify the type of a struct. A good term for that mindset would be "post OOP". As someone from that group, all I could think reading that CLOS post was "cute, the author really believes in all those early OOP promises? Must be a time traveler from the 20th century!" Actually checked the date, but then on the other hand they didn't have blogs yet when OOP was the future.
- jjtheblunt 4y agoi think of "blueprint" as an analogy for what "class" is supposed to describe.
- wirrbel 4y agoEarlier lisps called it „flavour“ Defflavor instead of defclass
- kgwgk 4y agoThat makes sense only when multiple inheritance is supported though.
- wirrbel 4y agoFlavours was single dispatch and the term for subclass was „dependent flavor“
- kgwgk 4y agoSingle dispatch has nothing to do with multiple inheritance. “Many versions of Lisp added OOP through the addition of an object system called Flavors, which went beyond Smalltalk and included multiple inheritance and method combination.” http://www.paulgraham.com/chameleon.html http://www.paulgraham.com/chameleon.html “The power of flavors (and the name flavors) comes from the ability to mix several flavors and get a new flavor.” https://franz.com/support/documentation/current/doc/flavors.htm https://franz.com/support/documentation/current/doc/flavors....
- rmckayfleming 4y agoThis is why I find prototype-based object systems so much more natural. Inevitably any dynamic object system ends up having to represent classes as objects, but that retroactively opens up a lot of mind-bending complexity. Prototypes on the other hand make far more sense in a dynamic context. You just create objects that you can clone and extend. Classes just become a design pattern. It also highlights that the interfaces of an object are more important than the class.
- skissane 4y ago> Classes just become a design pattern You haven't really got rid of classes though, you've just moved them from being explicit (something the language itself knows about) to implicit (something the developer keeps in their head). You still have some objects which play the role of "classes" (they are used as prototypes for other objects) and others which play the role of "instances" (no other object will use them as a prototype). How much of an improvement is there really if the concept still exists, but the language itself is ignorant of it?
- layer8 4y agoFrom https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=31385c5f46128f412e4d793460522851dad82d40 https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...: ‘We chose the terms “class” and “objects” of classes for our new Simula. The notion of subclass was especially appealing to us, since we had seen many cases of objects belonging to different classes having common properties. It would be useful to collect the common properties in a separate class, say C to be specialised differently for different purposes, possibly in different programs.’ It is about classifying objects. You want to have a shared definition for objects that share a common set of properties. Those objects constitute a certain class of objects, defined by their commonality. To specify such a class of objects, you specify those shared properties. This is what classes do in programming languages, they provide a specification of a certain class of objects. If you know that a given object belongs to a certain class, you then know that is has the properties specified by the class. For example, if you know that an object belongs to the class of String objects, then you know that it has a length property (or whatever). “Class” is very similar to “type”, except that “type” is usually more general. But in languages where everything (every value) is a object, “class” and “type” can be virtually the same.
- froh 4y agoyes. and in addition the word existed before, with the morning of "kind, category, group" of whatever. https://www.thesaurus.com/browse/class https://www.thesaurus.com/browse/class naming is hard and class is a good name for it's meaning in software.