3 ms·
Common Lisp is pretty much the opposite of what people think of as functional nowadays. You're constantly changing the image and everything is mutable.
by dismalaf 3mo ago
Common Lisp is pretty much the opposite of what people think of as functional nowadays. You're constantly changing the image and everything is mutable.
- tyromaniac 3mo agoI would presume there was a lot of mixing of imperative/functional in the 80s where this alt universe starts. I think the same type of world in which lisp machines would have become king would also be similar
- pfdietz 3mo agoImage saving isn't something that's done very often, in practice.
- Scarblac 3mo agoWhat is done in practice, for daily development use? Building the image in memory from source files at startup?
- johnlorentzson 3mo agoTypically, for development, one will start a clean image in the morning and load it up with a combination of newly compiled code and automatically cached previously compiled code. This is mostly invisible to the user unless something goes wrong with the cache and it has to be cleared. The unaware user could think they're recompiling everything every time.
- pfdietz 3mo agoYes, that's quite fast. The files are kept in a version control system so you update from that first as well. The use cases for images would be: delivery of applications to users, or (internally) delivery of some fixed set of underlying code that is used as a substrate for development but that wouldn't normally be changed by developers. Normally, the developer has an image running all day, and does development and testing in it, but (unless needed for additional testing) doesn't save that image as a new binary that others can run.
- agumonkey 3mo agoyeah it's a strange aspect of that lisp era, it was born in mccarthy's recursive functions over recursive lists.. and then interactive development over global state added as a layer. i would argue that lispers use of mutability was much more surgical and principled but maybe i'm biased
- dismalaf 3mo agoMcCarthy's pure Lisp existed only on paper. The first Lisp that ran on a computer had mutable variables, as did Lisp 1.5, Maclisp, etc... Immutability requires lots of copying and early computers didn't have much memory to spare...
- agumonkey 3mo agofair point but from memory most of early programs in his paper were purely immutable in nature (tree recursion and substition), right ?
- dismalaf 3mo agoYes but he also wrote this when describing the language: > In addition to the facilities for describing S-functions, there are facilities for using S-functions in programs written as sequences of statements along the lines of FORTRAN (4) or ALGOL (5). These features will not be described in this article
- agumonkey 3mo agohmm funny i completely missed that, i thought these traits were introduced a bit later
- muvlon 3mo agoYeah, all the common lispers I know are all about interacting with "live" programs as opposed to "dead", compiled ones. Nix takes the last live, mutable, reflectable part of the world of programmers today, the OS itself, and turns it into a dead program as well. So common lispers tend to hate Nix with a passion (as do Smalltalk users).
- attila-lendvai 3mo agoi'm a lisper, and i don't hate nix. i prefer guix, for sure, but i don't see this hatered you're talking about among other lispers either.