Hacker News new | past | comments | ask | show | jobs | submit login

Yeah, or sometimes by abusing the fuck out of templates, though that wasn't a possibility yet in the early 01990s. Emacs uses the same approach (adding an embedded dynamic scripting language), and I think PTC CAD does too, and in these cases the "embedded dynamic scripting language" is a Lisp. (AutoCAD, too, but I don't think they wrote significant parts of AutoCAD in AutoLisp.) It's a good approach that avoids paying the cost of flexibility except where you need it.



Since Lisp is often compiled to machine language, C/C++ is often only glue to the OS and large parts of the software is actually written in Lisp. GNU Emacs now has a variant with native compilation, so it there would possible to get rid with much of the C code without much loss of performance. Thus in a large CAD system, compiled Lisp is not just the scripting language, but can be much of the implementation.


Yeah, as I said above, it's not mostly about the performance¹ but about the bugginess, which is to say, the comprehensibility. There are arguments both ways about whether C or Lisp is more bug-prone (less comprehensible) but I think the results are in. And there are new languages like TypeScript which combine and exceed the advantages of both.

______

¹ Though GCC still routinely generates much better code than SBCL, much less the new Elisp compiler, that's not the primary consideration. I'm not sure why you're mentioning it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: