by znpy · 10y ago · 0 comments
"Lisp" means so little when you're writing real code.
Each implementation has its own quirks and even venerable books fall when confronted with real world code at learning.
For example: I was reading the SICP and using racket that looks like an interesting runtime nowadays. Turns out that a while a go the dev team made cons immutable and that's okay I guess but it broke (at least for me) the experience of reading SICP because I now have to pause and learn this quirk of this specific lisp implementation.
And don't even get me started on common lisp. There are at least 5 or 6 major common lisp runtimes, each of them incompatible somehow (try and read some of the StumpWM "makefiles" and you'll have a taste of what I'm talking about).
Also, common things (threads, for example) are still not provided in a uniform way across all of the implementations, and are often more or less quick hacks.
Scheme? Cool! Srfi! What part of scheme does your scheme actually implements? Would you use a C compiler without structures? And write code so that it can be compiled with another C compiler that has structures but doesn't have foot loops (only while loops are provided).
Lisps are awesome languages, but for me, no wonder they remain niche languages.
And before you downvote, please keep in mind that I am now booing Lisp, I would just love it to be more "sane" minded and less schizophrenic as a language/runtime, and more real-world-usable.
Edit: Not to mention, C only got threads in the most recent revision of the standard, and I can't say anything about their implementation because I've yet to encounter a project that uses C11.
https://github.com/sionescu/bordeaux-threads
and
I guess this pretty much sums up the state of many common lisp libraries.
Also, if it is so portable and so useful, why hasn't it made part of the language and of the various implementations?
Why there are no updates to the standard?
https://common-lisp.net/project/bordeaux-threads/
> Also, if it is so portable and so useful, why hasn't it made part of the language and of the various implementations?
You make it a part of the language by loading it in.
CL-USER 23 > (ql:quickload "bordeaux-threads")
To load "bordeaux-threads":
Load 1 ASDF system:
bordeaux-threads
; Loading "bordeaux-threads"
[package bordeaux-threads]...
("bordeaux-threads")
> Why there are no updates to the standard?Because it is too expensive (it's an ANSI Standard, which makes things difficult), there are no sponsors for it and not enough are interested to do the work.
The language evolves in libraries, portable substrates and implementations since some time.
Note that the language has a lot of flexibility for change built in: reader macros for the s-expression syntax, macros for the Lisp syntax, meta-object protocol for the object-system, packages enable new Lisp dialects, ...
I'm pretty sure that you're supposed to choose the correct language in Dr. Racket if you want mutable cons semantics (such that you're using R5RS and not Racket).
Or get #lang sicp from pkgs.racket-lang.org.
Common Lisp is a different story though, the standard is comprehensive and it's easy to go from one implementation to another, often requiring no effort.
In most cases where there's an incompatibility among two Lisp environments, you can just write a macro or two to sort it out, whereas with C, if you don't have a for loop, you either patch the compiler or use the while loop.
Is it though? I think the biggest problem is employment prospects -- it's just not used enough in industry. I have used a lisp professionally, and I am of the opinion that that opportunity was a one-time thing career-wise for me. these days, I can't justify spending time on anything but Java or C++ in terms of my career trajectory. would like to hear others' thoughts though.