Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 5
    Citing the very link you posted: “BETA language introduced this notion of nested classes.” Commented Jun 25, 2018 at 15:36
  • It’s worth noting that the list in that article is woefully incomplete. Virtually all languages that support ad-hoc class declarations support inner classes, including LISP dialects and many functional programming languages. Commented Jun 27, 2018 at 9:12
  • 2
    @KonradRudolph: OTOH, the list includes Ruby, in which you can have lexically nested class definitions, but they don't produce nested classes. They only produce nested names. The list seems to confuse the syntactic possibility of writing a class inside another class with the semantic feature of nested classes, which are properties of the class instance just like fields are. In fact, a nested class is in essence very much like a first-class class object assigned to a field of the object. Commented Jun 27, 2018 at 12:29
  • 1
    @JörgWMittag Yes, same for most of the list, including C++, VB, C#. That article is rubbish. Commented Jun 27, 2018 at 12:40
  • Another, equally interesting pioneering innovation by Beta are virtual classes. In fact, they don't make sense without "true" nested classes, since a virtual class is a class that is a member of an outer class (IOW a nested class) that can be overridden in a subclass, just like a virtual method is a member of a class that can be overridden in a subclass. They are insanely powerful and exist AFAIK only in Beta, gBeta, Newspeak and some research dialects of Java. Scala tried them out, but they were so powerful that they broke the type system, so they were removed again. Commented Jun 27, 2018 at 20:57