2 ms·
> SBCL generates quite performant code. Then why are virtually all browser engines, high-performance games, and video codecs written in C++? Why is every massi
by bitwize 3y ago
> SBCL generates quite performant code.
Then why are virtually all browser engines, high-performance games, and video codecs written in C++? Why is every massive-scale web application written in C++? The only one that comes close that's written in Lisp is QPX, and even then they had to write a lot of C++ because Lisp's I/O facilities just weren't up to the task of moving the huge amounts of data they had to move.
> C++ and Java have nothing like their macro systems
C++ has template metaprogramming, which covers like 90% of the cases where you'd actually need Lisp macros, and outputs code that's statically typechecked with deterministic memory and runtime constraints.
- cess11 3y agoWhatsapp is written in C++? When did they do the rewrite? You can have compile time type checking in Common Lisp if you want.
- nequo 3y ago> Why is every massive-scale web application written in C++? Sibling mentioned WhatsApp which was Erlang. Facebook is PHP. Pre-Musk Twitter was written in Scala.
- p_l 3y agoTwitter before Scala was done in Ruby on Rails, even.
- p_l 3y agoThe C++ bits in QPX were, as far as I know, relatively tiny elements for setting up memory mapped file, done this way because there wasn't good native interface in CMUCL. The contents of that data file was generated by lisp batch job, too.
- ragall 3y ago> Then why are virtually all browser engines, high-performance games, and video codecs written in C++? Path dependence. There are only two lineages of widely used browsers today: Chromium/Webkit (coming from Konqueror, initial release 2000) and Firefox/Gecko (coming from Netscape, initial release 1994). Nobody's rewriting them. The same goes for video game engines and other high-performance software.
- cess11 3y agoIf someone invents another browser, Nyxt will be ready to wrap it with Common Lisp: https://github.com/atlas-engineer/nyxt https://github.com/atlas-engineer/nyxt