6 ms·
Is this like Common Lisp's dispatch as defined by the default CLOS implementation?
by malkia 5y ago
Is this like Common Lisp's dispatch as defined by the default CLOS implementation?
- ThomasMoll 5y agoYes! In fact I think Julia borrows a lot of concepts from CL and the like for their type system implementation.
- snicker7 5y agoJulia is basically a trojan horse for Lisp. Syntactically, it looks kind-of like Matlab. But semantically it is very much in the Lisp family. Since 1959, Lisp remains the best idea in computer programming. And Julia is bringing it to the masses.
- pjmlp 5y agoYeah, although Java did it first. "We were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." - Guy Steele I assume Guy Steele knows his stuff when talking about Lisp like languages.
- lispm 5y agoJava mostly only got typical runtime ideas (managed memory, virtual machine, code loading, calling conventions, runtime safety) of the JVM from Lisp (often via Smalltalk, etc.), but not ideas like executable memory heaps, code as data, etc. Higher language feature from Lisp (CLOS, macros, conditions, closures, interactive development, ...) were not brought to mainstream Java. Closures, some interactivity, ... eventually were added many years later. From a Lisp user perspective Java was more than 'halfway' away, and probably still is.
- pjmlp 5y agoGuy Steele did not say 100%, after all. So we could argue bullet points about how someone highly relevant in Lisp and Scheme community was wrong on his assertion, if you like.
- lispm 5y agoThere are lots of highly relevant people in the Lisp and Scheme communities. https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg04048.html https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...
- pjmlp 5y agoSure there are, yet none of them were responsible for designing parts of Java architecture, and made the statement we are discussing about. Had not been for Guy Steele's background, and the context of the talk where he made that statement, I would agree with you.
- lispm 5y agoThere were many (ex-)Lispers working on comparable languages: inkl. Java, C#, Dylan, ... The discussion took place on the Little-languages list, where also a bunch of people with actual Lisp experience and general language design&implemetation experience were participating. I'm pretty sure many of them had a good idea where Java was technically positioned in the language landscape between C, C++, Ada, ... ML, Scheme, Lisp, Prolog, Smalltalk, Self, Perl, TCL, ... Also keep in mind that SUN at that time was aggressively marketing Java as THE new language for system and application development, especially for the enterprise (a main target market for SUN). Though the origins of Java was as a programming language for set-top boxes, when it was still called Oak. The quote from Guy was kind of an excuse there, for the modest design goals: at least we (-> SUN) dragged C++ developers towards Lisp, even though Smalltalk, Lisp, etc. people themselves were not a target and were not that impressed. Things like Garbage Collection in a language designed to replace C++ in many scenarios was still revolutionary.
- adgjlsfhk1 5y agoThe main difference is that Julia uses more complicated subtyping and specificity to let you express some useful more complicated relationships (e.g. diagonal dispatch). Also, there is a major difference that in Julia all methods use multiple dispatch (and there isn't a performance cost to doing so). Multiple dispatch in Lisp was severely limited by people not using it for performance reasons.
- dreamcompiler 5y ago> Multiple dispatch in Lisp was severely limited by people not using it for performance reasons. What do you mean by this? In what ways do you find MD in Lisp "limited"?
- oscardssmith 5y agoI haven't used lisp a ton, so I might be missing something here, but as I understand it, multiple dispatch in lisp is opt in. The downside of this is that since it has a performance penalty, people didn't use multimethids for core functions like +, so you lose the benefits multiple dispatch offers.
- lispm 5y agoStill a Lisp system may have thousands of Generic Functions with ten thousands of methods. One Lisp implementation I use has that many out of the box. Incl. various I/O related code: streams, networking, graphics, user interface, development environment, ... Even though low-level numeric code might not be written with them, large parts of applications often are written using them.