4 ms·
I agree with your characterization of Ruby as a Self/Smalltalk category language. (Or, a language with an ALGOL-style syntax and a Smalltalk-style OO system.)
by JW_00000 3y ago
I agree with your characterization of Ruby as a Self/Smalltalk category language. (Or, a language with an ALGOL-style syntax and a Smalltalk-style OO system.)
> After the "Self" category, Ruby would fit better under the "Lisp" family than the "ALGOL" family because of Ruby's deep metaprogrammability.
I don't agree with this: Lisp's metaprogramming capabilities come from its macro system, while Ruby's metaprogramming capabilities are due to metaclasses (which is exactly why it fits in the Smalltalk category).
JavaScript is also not a ML-style language in my opinion. ML-like languages have not just types, but also pattern matching and algebraic data types. First-class functions is not unique to the ML category, it also applies to the Lisp and Smalltalk categories (and maybe APL, I don't know it enough).
I also still think of JavaScript as an ALGOL-style language augmented with Self concepts (Self, not Smalltalk!), but this may be because when I first started with JavaScript it didn't have classes yet. The good old days...
- neallindsay 3y agoI think of "functional" meaning first-class and higher-order functions, but lots of people use that term to mean pattern matching and type systems. It definitely seems like the author of this article meant the "ML" category to mean the latter. When they added the `class` keyword in JavaScript it didn't change the capabilities of the language—it's still prototypal under the hood, but I guess the syntax matters. I certainly see people writing "classes" in JS a lot more now.
- fanf2 3y agoALGOL 68 has first-class and higher-order functions. Arguably ALGOL 60’s call-by-name allows you to do some higher-order things, even though its functions are not first class.
- lispm 3y ago> I don't agree with this: Lisp's metaprogramming capabilities come from its macro system, while Ruby's metaprogramming capabilities are due to metaclasses (which is exactly why it fits in the Smalltalk category). Though, see the Common Lisp Object System Meta Object Protocol (CLOS MOP). There were a bunch of meta-object systems for Lisp, with the CLOS MOP as the most prominent example.