by sillysaurus3 · 11y ago · 0 comments
Obviously, it doesn't matter whether those features are old or new. What matters is whether the language executes them in a compelling way. But almost every single one of those features has been a core aspect of programming languages which have been around since before most of us were born.
Also, the mods have strongly urged me to write shorter comments, and to write comments less frequently. And they've suggested that more than once. I try to oblige, and this is the result. So technically I can't flesh out my comments without going against their advice.
Of that list of nine features, I'm certain six are extremely old:
* Run regular code at compile time
* Extend the language (AST templates and macros);
this can be used to add a form of list comprehensions to the language!
* Add your own optimizations to the compiler!
* Bind (easily) to your favorite C functions and libraries
* Unified Call Syntax, so mystr.len() is equivalent to len(mystr)
* Good performance -- not placing too much emphasis on this,
but it's faster than C++ in his benchmark
I wouldn't be surprised if GC control and typesafe enums are also extremely old, bringing that up to "8 out of 9 features are old." But it's at least 6 out of 9.Actually, Lisp has been executing regular code at compile time with good performance since the tail end of the 1980's. Maybe even before that. This is why I said "everything old is new again."
No one said idiomatic Lisp was performant. They said Lisp was performant. Seriously, it's not even difficult. It's not like it's a situation where it's easy to accidentally kill your performance by writing elegant code while having no idea why it's slow.
Optimizing a Lisp codebase is a straightforward exercise, no more difficult than optimizing a Lua or Javascript codebase.
If someone hasn't shipped more than a toy program with Lisp, it's easy to believe the opposite. But if you try it, you'll see that it's true.
* Run regular code at compile time
Lisp, of course. Since very long ago. * Extend the language (AST templates and macros);
this can be used to add a form of list comprehensions to the language!
Lisp, but also Dylan, Elixir, JS with Sweet.js and more. See for example here: https://opendylan.org/articles/macro-system/index.html * Add your own optimizations to the compiler!
I'm not sure here. * Bind (easily) to your favorite C functions and libraries
Almost every serious language has FFI for C. Nimrod offers a possibility to use statically linked libraries, which is not very popular, but for example Gambit Scheme does this since long ago. * Unified Call Syntax, so mystr.len() is equivalent to len(mystr)
Lua, somewhat. Also Dylan again. * Good performance -- not placing too much emphasis on this,
but it's faster than C++ in his benchmark
Too many to count. * Compile to JavaScript
OCaml. And more: almost every language has a compile-to-JS project for it (although only a couple are workable).EDIT:
> typesafe enums are also extremely old
Aren't those just sum types? This would make them as old as ML at least.
This of course doesn't make Nimrod any less interesting a language and some combinations of those features may be rather novel. Still, 'everything old is new again' I think is 100% true for all of these features. In reality you won't ever encounter truly unprecedented features in general purpose languages and outside of academia: one can go to LtU site for those. All the rest languages are built on really old (proven) concepts, which they reimplement and package in a (very) different ways. I have no idea why would you get downvoted for stating such fact.
Lisp, via compiler macros: http://www.lispworks.com/documentation/HyperSpec/Body/03_bba...
> The purpose of the compiler macro facility is to permit selective source code transformations as optimization advice to the compiler. When a compound form is being processed (as by the compiler), if the operator names a compiler macro then the compiler macro function may be invoked on the form, and the resulting expansion recursively processed in preference to performing the usual processing on the original form according to its normal interpretation as a function form or macro form.
Only very tiny fraction of ideas or implementations are really new in programming language design. There is "prior art" for nearly everything, sometimes dating back to sixties. And being both dynamic and fast has been a research topic for decades now. The problem is hard, but we're steadily making progress - as a result we created a lot of (both abandoned and still alive) languages along the way.
This is like someone going onto a forum and saying "Java is slow!" while ignoring the fact that trading institutions use Java as their primary language for stock market trading. And they wouldn't do that if Java was slow.
I'm trying to be as patient as possible, but this is really getting out of hand. Most people in this comment thread simply have no idea what they're talking about.
Specifically, look up "GOAL Lisp". Gamedevs wouldn't use Lisp if Lisp wasn't capable of providing performance comparable to C. The entire company would've died.
And not merely downvoted, but karma carpet bombed (-10). Such an honor used to be reserved for troll comments rather than true statements.