Comment by runlaszlorun
3 years ago
Oh, cool. I’m thinking about something similar with SBCL plus vanilla JS. I’m not worried about libraries and these days try to be a library/framework free as possible. The web dev basics of an application server, access to an RDBMS, and possibly help spitting out HTML/CSS/JS are all I need. And it seems like Common Lisp checks those boxes. I’ll give quicklisp props too as everything I’ve tried to install ran on one go. That’s unfortunately not always my experience elsewhere.
Out of curiosity, have you done Lisp before? I’m curious if productivity gains would be lost in me ramping up.
I've dabbled in lisp on and off for a number of years but have never written it professionally.
Back in the early aughts I learned a much more orthodox way of programming with C++ in first year university and fiddled with a bunch of scripting languages making game mods and stuff in my teens and early 20s. C# is probably what I have written the greatest number of LOC in, so I'm very much an ALGOL normie.
Lisp isn't as weird as people like to pretend it is. Once I wrapped my head around the syntax (which takes maybe an hour) the biggest things I wrestled with were
- the type system (variables don't have types unlike C# and friends, they're just named registers where you can shove anything)
- CLOS (in my opinion it's kind of a leaky abstraction, not as good at encapsulating/hiding the underlying complexity as, say, C# or Java, but CLOS definitely has its strengths)
- the language-adjacent concept and nomenclature like Systems. What Lisp calls Packages are pretty close to what most other languages would call namespaces, and what lisp calls Systems are what other languages call Packages, or maybe libraries.
My experience has been that it's a very expressive language and easy to write once you get into the flow of things.
> (variables don't have types unlike C# and friends, they're just named registers where you can shove anything)
This depends on the implementation one uses: SBCL does type checking:
SBCL does that a compile time, too.
> - the language-adjacent concept and nomenclature like Systems. What Lisp calls Packages are pretty close to what most other languages would call namespaces, and what lisp calls Systems are what other languages call Packages, or maybe libraries.
Lisp is old, these names are from end 70s ("package") and ~1981 ("system") - at that time they were used in the MIT Lisp Machine system software.
>SBCL does type checking
It does, and values have types but variables don't. Without the DECLAIM facility you can do the following:
Whereas in C# you cannot do the following:
Thats all I meant.
1 reply →