4 ms·
Things like lisp, forth and also lambda calculus are conceptually clean. In theory one can write anything in them in a conceptually clean way. However, doing so
by cjfd 6y ago
Things like lisp, forth and also lambda calculus are conceptually clean. In theory one can write anything in them in a conceptually clean way. However, doing so one has also puts programming and/or computers in a straight jacket which one is going to notice as soon as one wants optimal performance. This is simply not possible anymore. The language that exposes the machine as cleanly as possible is clearly C. But this is not conceptually clean anymore because now one can store information in global variables, on the stack and on the heap. I.e., one has three ways to store values. This is not conceptually clean anymore but it is how one is required to think of computers to do much with them in a performant way. Note that the 'simple' languages actually only expose one of these three concepts to the programmer. In Lisp and the lambda calculus only the heap is exposed and in forth only the stack. In practice, though, implementations of these languages often expose more than what they do in theory. At that point they are no longer clean anymore and I kind of fail to see the point in that case.
- Thiez 6y ago> The language that exposes the machine as cleanly as possible is clearly C. It exposes the PDP-11 most cleanly. For modern machines the mismatch between the C abstract machine and the actual hardware has been steadily increasing for decades. It's still close to the hardware compared to almost all other languages, but it is by no means "as cleanly as possible". It's not portable assembly like in the days of yore.
- aidenn0 6y agoCommon lisp exposes two of these three to the programmer, (stack and heap) and some implementations offer globals as an extension. A lot of myths about lisp being conceptually pure come from poorly taught college classes. If there were one active lisp user for every time I've heard "Lisp? The only thing I remember about that is that it doesn't have loops," then the lisp community would be a large thriving community.
- pjc50 6y ago> The language that exposes the machine as cleanly as possible is clearly C Well .. sort of. I agree with the comment about C being effectively a PDP-11 VM; there are all sorts of features which it doesn't and can't expose. If you look at the Intel instruction set of the present day with all its extensions, how much of that can the compiler really emit? Multithreading is also something that's been very awkwardly retrofitted to C, with all sorts of memory ordering issues that aren't easy to fix. Then there's all the "undefined behaviour" wrangling. By raw FLOPS the most powerful part of the average computer will be the graphics card, which really isn't suitable for C (or Lisp!) programming at all.