5 ms·
Dynamic typing and garbage collection didn't really catch on
by JonChesterfield 2y ago
Dynamic typing and garbage collection didn't really catch on
- mepian 2y agoI guess nobody is using Python or Java.
- cmrdporcupine 2y agoYeah, and REPLs. Totally not a thing :-) Remember when it was highly controversial for Java (and then C++) to get lambda expressions and many treated us as egg-headed academic nerds for wanting those things? I sure do.
- dfox 2y agoIn java lamdas are just a syntactic sugar for anonymous inner classes, with the same resulting limitations, so one can either argue that java always had lamdas, but with weird verbose syntax, or that java does not really have lambdas (in which case C++ and Python also do not have lambdas, as the semantics are similar).
- cmrdporcupine 2y agoYeah, I moved on from Java before lambdas were standardized, so can't comment much but what was painful was watching just how bloody long it took to get them into the language.
- trealira 2y agoThe point of a language feature is to have support in the syntax and in the compiler for it. Going down that lane, you could say that C has always had object-oriented polymorphism, because you can manually insert pointers to tables of functions in your data structures, and call it just verbose syntax for the virtual methods featured in C++.
- lmm 2y agoOr syntax actually matters. Which ironically is where the lisp people went wrong.
- kazinator 2y agoSyntax does matter. That's one area where the Lisp people went right. Lisp syntax is nice to work with irrespective of everything else, which was quite a discovery, which came as a surprise. The Lisp project itself didn't expect it; Lisp was supposed to be programmed in M-expressions. Furthermore, there was a second generation project, Lisp 2, that provided an Algol-like syntax over top of the Lisp internals. Because syntax matters, M-expressions and Algol syntax for Lisp fell by the wayside. Other subsequent attempts also faced very limited success.
- aredox 2y agoWhat would those M-expressions have looked like?
- Y_Y 2y agoMathematica. Mathematica is the M-expression language. It's actually very expressive and has nice tricks like multimedia literals and the ability to do some fancy almost-tex rendering in expression, but deep down it's all sexps and lists and symbolic manipulation thereof (and an FFI). (I think they tried to rebrand the language a couple of years back as "Wolfram", lol.)
- lispm 2y agoTechnically what Mathematica calls "lists" are one-dimensional arrays (aka vectors in Lisp), but not Lisp-like singly-linked lists. This is an example of an M-Expression in the original definition of Lisp: [eq[third[(A B C (D . E))];C]→cons[D;cdr[((A 1 2 3) B C)]; T→car[x]] which is roughly equivalent to the Lisp S-Expression (COND ((EQ (THIRD (QUOTE (A B C (D . E)))) (QUOTE C)) (CONS (QUOTE D) (CDR (QUOTE ((A 1 2 3) B C))))) (T (CAR X))) Which evaluates to (D B C)
- pjmlp 2y agoThere are definitly not, they are implemented via invokedynamic. "Implementing Lambda Expressions in Java with Brian Goetz" https://www.youtube.com/watch?v=Uns1dm3Laq4 https://www.youtube.com/watch?v=Uns1dm3Laq4 C++ lambdas follow the functor class model, and they also capture the environment, the only difference is that we get to say what we want captured.
- abecedarius 2y agoGosh. Emblematic event: the journal Lisp and Functional Programming changed its name to drop Lisp, around early 90s iirc. So much of Lisp is super mainstream since before some programmers were born, now, that those aspects are no longer linked with it. And dynamic typing and GC are fucking ubiquitous compared to their status in the 80s.
- blast 2y agoI was annoyed at first but I think JonChesterfield was joking
- abecedarius 2y agoOh, thanks! Very thick of me.
- JonChesterfield 2y agoIt's an obvious joke from the perspective of javascript or literally true for rust enthusiasts. It's fascinating that various different branches of the language tree agree that lisp did some things right and completely disagree about which things those were.