5 ms·
"Lisp isn't quite as dynamic as Ruby" ?! Please substantiate. And of course when I say "Lisp" I really mean "Common Lisp".
by Hexstream 18y ago
"Lisp isn't quite as dynamic as Ruby"
?! Please substantiate. And of course when I say "Lisp" I really mean "Common Lisp".
- icey 18y agoI'd also like some substantiation around the claim that Javascript can be as fast as Java.
- jamesbritt 18y agoRhino? I'm guessing; I have no numbers on how it compares to actual Java.
- sharkbrainguy 18y agoThat's like saying that ruby is probably as fast as c because the interpreter is written in c. http://tinyurl.com/daom93 http://tinyurl.com/daom93 - shootout numbers rhino v. java
- jamesbritt 18y ago"That's like saying that ruby is probably as fast as c because the interpreter is written in c." I was under the impression that Rhino was doing some compiling to byte-code (unlike what MRI does, but what perhaps like JRuby does). Live and learn.
- jamesbritt 18y agoWTF is with modding people down for saying they took a guess, were wrong, and now learned something? Does that in any way add to the discussion?
- richcollins 18y agoThou shalt not mock Lisp or be in any way associated with one who does: http://news.ycombinator.com/item?id=545859 http://news.ycombinator.com/item?id=545859 http://news.ycombinator.com/item?id=545851 http://news.ycombinator.com/item?id=545851
- jamesbritt 18y agoSpeculation on the behavior of Rhino equals mocking Lisp? Wow; who knew?
- icey 18y agoYeah, I noticed that as well... Kind of bizarre. Especially since Rhino was a pretty good educated guess; I went and took a look at it as well since I know there are some pretty performant languages running on the JVM that aren't Java. For whatever it's worth, I think the problem Javascript is going to have with speed is that it is so dynamic that it makes it difficult for compilers to optimize. If it ever got type hints it would probably be much easier to make fast.
- sharkbrainguy 18y agoSorry that sounded as snarky as it obviously did. I thought I was just drawing an analogy. Anyways... The semantics of javascript are so different to Java (javascript functions are not like java functions everything is dynamic etc.) that you can't really expect the performance of javascript code to be comparable to Java just because it's hosted on the JVM, even if it did compile to Java byte code. The Javascript equivalent would have to do so much more work than the Java version to support all the crazy crap you can do in javascript (ad hoc adding of properties to almost any object at any time).
- jamesbritt 18y agoThanks for the clarification.
- richcollins 18y agoI did pull that out of my ass, but Nitro and V8 perform polymorphic inline caching. Many execution paths are inlined as machine code -- java won't be any faster for these execution paths.
- richcollins 18y agoCan you add and remove slots from a closure? Names in closures are bound at the time that they are created. There is no instance_eval in Common Lisp.
- MaysonL 18y agoHowever, I am pretty sure that you could build such a beast in CL, as well as "closure"s with addable/deletable slots.
- richcollins 18y agoYes you can build it in C as well, that doesn't make C dynamic.