3 ms·
From type systems theory point of view, a class is an extensible module that can be used as a variable. As mentioned in another reply, Java did not invent this
by pjmlp 1y ago
From type systems theory point of view, a class is an extensible module that can be used as a variable.
As mentioned in another reply, Java did not invent this, it was building upon Smalltalk and SELF, with a little bit of Objective-C on the side, and C++ like syntax.
Try to create a single function in Smalltalk, or SELF.
http://stephane.ducasse.free.fr/FreeBooks.html http://stephane.ducasse.free.fr/FreeBooks.html
https://www.strongtalk.org/ https://www.strongtalk.org/
https://selflanguage.org/ https://selflanguage.org/
It is also no accident that when Java came into the scene, some big Smalltalk names like IBM, one day of the other easily migrated their Smalltalk tooling into Java, and to this day Eclipse still has the same object browser as any Smalltalk environment.
Smalltalk,
https://www.researchgate.net/figure/The-Smalltalk-browser-showing-abstract-classes-and-required-methods-In-the-method-list_fig1_220139628 https://www.researchgate.net/figure/The-Smalltalk-browser-sh...
Which you will find a certain similarity including with NeXTSTEP navigation tools, and eventually OS X Finder,
The code browser in Eclipse
https://i.sstatic.net/4OFEM.png https://i.sstatic.net/4OFEM.png
By the way, in OOP languages like Python, even functions are objects,
Python 3.14.0 (tags/v3.14.0:ebf955d, Oct 7 2025, 10:15:03) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def sum(x, y): return x + y
...
>>> sum
<function sum at 0x0000017A9778D4E0>
>>> dir(sum)
['__annotate__', '__annotations__', '__builtins__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__getstate__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_params__']
>>> type(sum)
<class 'function'>
>>> sum.__name__
'sum'
>>> sum.__class__
<class 'function'>
- lproven 1y ago> The code browser in Eclipse > https://i.sstatic.net/4OFEM.png https://i.sstatic.net/4OFEM.png « Error 1011 Ray ID: 9973d6cc1badc66a • 2025-10-31 14:28:28 UTC Access denied What happened? The owner of this website (i.sstatic.net) does not allow hotlinking to that resource (/4OFEM.png). »