TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Revisiting Prechelt’s paper comparing Java, Lisp, C/C++ and scripting languages

118 pointsby mahmoudimusalmost 4 years ago

9 comments

lisperalmost 4 years ago
I am Ron Garret (f.k.a. Erann Gat), the author of the followup study mentioned in TFA. I am, frankly, amazed that this work is getting the amount of attention that it is over 20 years after it was published. I have a couple of comments about this latest critique.<p>&gt; Given that the participants were recruited from internet groups, I doubt that the subjects were monitored in place, which makes me think that the Development time data collected should be taken with a giant grain of salt.<p>&gt; Based on a small study like Garret’s, I find that the premise that Lisp is so great is unwarranted.<p>That&#x27;s a fair criticism. In my defense I will say that I didn&#x27;t actually claim that Lisp <i>is</i> great, only that it seems plausible that it <i>might</i> offer the development speed and runtime safety advantages of Java and the execution speed of C, and so it is worth paying some attention to it, and maybe doing further studies. I certainly believed (and continue to believe) that Lisp <i>is</i> great, but I certainly concede that my data didn&#x27;t (and doesn&#x27;t) prove it. Renato seems to agree:<p>&gt; However, the data does suggest that Lisp is about as productive as the scripting languages of the day and has a speed comparable to C and C++, which is indeed a remarkable achievement.<p>FWIW, my study was a throwaway side-project conducted on the spur of the moment in my spare time. It was intended more to get people&#x27;s attention and make the case that Lisp ought to be considered alongside Java as an alternative to C than to be a rigorous scientific case for Lisp&#x27;s superiority over Java. At the time, Lisp was quite a bit more mature than Java, and indeed one could have argued (and indeed could argue today) that Java was an inferior re-invention of many of the ideas that Lisp had pioneered, with automatic memory management being at the top of that list. I was frustrated that Java was getting all the attention because it was the shiny new thing and Lisp was being ignored because at the time Java actually sucked pretty badly. (IMHO it sucks pretty badly today too, but that is now a much harder case to make.)<p>In any case, what astonishes me most is that AFAICT no one has ever done a follow-up to either of these studies that was better designed and used more rigorous methods. Instead, people just seem to keep citing these papers again and again as if squeezing these turnips harder might yield something worthwhile now that could not be extracted from them when they were first published.<p>This is a very fertile field for further research. Someone should cultivate it.
评论 #28109570 未加载
评论 #28109726 未加载
评论 #28112554 未加载
评论 #28110695 未加载
评论 #28113367 未加载
评论 #28110218 未加载
评论 #28109453 未加载
bchalmost 4 years ago
John Ousterhout (creator of Tcl (mentioned in OP paper)) also wrote an interesting paper about the “scripting” vs “system” language dichotomy, “Scripting: Higher Level Programming for the 21st Century”[0] which some may find interesting.<p>[0] <a href="http:&#x2F;&#x2F;users.ece.utexas.edu&#x2F;~adnan&#x2F;top&#x2F;ousterhout-scripting.pdf" rel="nofollow">http:&#x2F;&#x2F;users.ece.utexas.edu&#x2F;~adnan&#x2F;top&#x2F;ousterhout-scripting....</a>
jillesvangurpalmost 4 years ago
It was an interesting distinction in the nineties to make whether languages were interpreted or compiled. Then things got complicated when we started compiling things just in time. And then things got even more complicated when we started compiling compiled languages to imaginary instruction sets that we then interpreted at run time only to compile them just in time. To make things even more complicated, Java now has an ahead of time compiler too.<p>Java was merely the one of such languages and instruction sets. If you look at WASM, it&#x27;s exactly the same vision: a portable instruction set that can be run anywhere. Except this time it&#x27;s optimized not for just one language but any language and the most popular languages on it currently are C++ and Rust, which are compiled languages not intended for this kind of thing.<p>There are other ways to compare languages but their run times are a bit apples and oranges. Typing systems have evolved too. Java now has inferred types and ruby and python now have type annotations. The lines blurred. Purely dynamically typed languages still exist but are increasingly sidelined in favor of at least partially statically typed languages (e.g. Javascript vs Typescript). Assemblyscript takes that to the next level and compiles to WASM instead of Javascript. You see similar evolution in the Ruby ecosystem (e.g. Crystal). And the python ecosystem, which has multiple compilers.<p>The distinction has ceased to be relevant. It&#x27;s more about what kind of limitations you are willing to impose in exchange for performance. Rust makes a few very clever tradeoffs here where they do a lot of heavy lifting with templates to provide so-called zero cost abstractions. People even attempted REPLs for it. It&#x27;s a scripting language!
robertwt7almost 4 years ago
It’s interesting that even a system programming language like rust is actually not faster than java if not written &#x2F; implemented correctly. People always thought that when they needed to go faster they go for c++&#x2F;rust. I guess advance knowledge in one programming language is better than switching to another one in the case where you need to make your app faster<p>Also isn’t this similar to this study? <a href="https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;...</a>
评论 #28117844 未加载
jeffbeealmost 4 years ago
I&#x27;ve been asked to whiteboard this or very similar problems in 45-minute job interviews. Based on my experience in those interviews I am not surprised to see it typically takes 3-10 hours to do a proper job of it.
评论 #28114069 未加载
amusedcyclistalmost 4 years ago
I mean of course Java is slower if you&#x27;re including JVM start up time. A more modern version of the problem would ask for a service which performs the same function and averages time taken over N requests. I suspect modern java would look pretty close to C++&#x2F;rust there
评论 #28110374 未加载
评论 #28121302 未加载
评论 #28117954 未加载
评论 #28111871 未加载
评论 #28112979 未加载
ncmncmalmost 4 years ago
Anywhere you see &quot;C&#x2F;C++&quot;, treated as if a single language, you know that you will be not getting good information. It is common to claim &quot;almost as fast as C&quot;, when it is known that C is now a low bar. For speed, nowadays, you use C++. (Or Rust, for identical reasons.)<p>The most characteristic quality of any publication about the performance of Lisp, as for anything like it, is exaggeration. In particular, indirect costs of garbage collection are invariably concealed.
评论 #28112382 未加载
评论 #28115267 未加载
btillyalmost 4 years ago
I remember loving these papers back in the day.<p>First, I would be far less skeptical than this author is over the tradeoffs of scripting languages. Given the tools offered by scripting languages, there is one obvious way to do things. The overhead of building a fancy &quot;just right&quot; data structure almost always makes things perform worse than the straightforward solution using dictionaries, arrays and scalars. Given that, people go directly to that solution, leading to less variation in length of code, time and performance. It is always possible to beat a scripting language&#x27;s performance, but a surprising number of programmers won&#x27;t.<p>This is a lesson that generation after generation of programmers have learned in a variety of scripting languages. With the latest winner being Python. But the differences between popular scripting languages generally matter a lot less than the commonalities. (There are exceptions, specialized languages like Lua, R and Julia have very specific strengths and weaknesses despite being aimed at scripting.)<p>Second, there are two basic reasons why Lisp loses.<p>The first is the disadvantage of being an image based system. This has a lot of upsides, but the downside is that people lose access to a long toolchain that they are used to for dealing with files. Tools including editors, source control, and so on. Programming expertise is fragile, and that is a pretty big shock.<p>The second is that Lisp attracts people who want a perfect language. Unfortunately people&#x27;s ideas of perfection different. So we get a large number of related dialects of Lisp, which are almost compatible with each other. And fail to get critical mass behind any of them.<p>That said, how big a deal is achieving critical mass? Well obviously it matters. If you&#x27;re using a mainstream language you can find packages for things that you need, answers on StackOverflow, and so on. But there are diminishing returns. The size of CPAN didn&#x27;t keep Ruby from rising, and JavaScript and Python in turn have seen meteoric growth.<p>But that said, there is a fundamental tradeoff. Working in a popular language matters more if you&#x27;re planning on leveraging lots of existing work. The more your project is building on what you yourself have built, the less important the easy start of external packages is relative to your own development familiarity. The more specialized the thing that you&#x27;re building, the more it makes sense to use the perfect language for you&#x2F;your space, rather than going with what&#x27;s popular.
评论 #28110938 未加载
hosejaalmost 4 years ago
&gt;))))))<p>Well that&#x27;s certainly on par.
评论 #28116108 未加载