5 ms·
What are the enduring innovations of Lisp? (2022)
- sargstuff 4y ago1st class NIL, NULL, 'nothing'/ aka () and blank aka "" and/or '' handling without manditory kid gloves work arounds thereby eliminating the future possibility of whole classes of 'wierd' bugs/crashes/issues. (before C, blue screens of death, stack/heap smashing, seg faults, core dumps and Lvalue & Rvalue were a thing)
- eslaught 4y agoYes, Lisp was the first memory-safe programming language. And the rich data model is part of that. Fortunately this is something other languages have been borrowing from for a while now, and explicit nullability via Option and the like is pretty common.
- sargstuff 4y agoHave yet to see a non-lisp language that fully handles the lisp 'nada' stuff correctly without programmer having to do some extra work. Where equating extra work because language didn't handle primatives as language issue that causes needless problems for programmer. NIL not equivalent to NULL, "", ''. Shortest non-theory example, taken from punchcard reader operations manual. NIL -> no more cards going through card reader. NULL -> reached end of card vertical (carrage return), horizontal, "group"/tab space character all blank card, no data -> no punches, no mem, max line count all blank card, all spaces -> no punches, max mem, max line count all deleted card -> assume doesn't jam machine, no line count. Best command line example would be linearly chaining unix shell scripts using pipes & redirection to simulate a spread sheet. historical command characters (usually non-printable) become the sticking point (pipe & file names). aka is value of 0 a representation of NIL, NULL, no error code, delete character, no-character, string without line terminator, first byte in multi-byte sequence (unicode / internet mask), indirect file/memory location reference. To handle the aformentioned 'specials', have to go outside the linear pipe sequence.
- sargstuff 4y agoOriginal fortran / lisp era, lot of memory was 2,048 bytes. Lot of very subtle foundational distinctions. From pre-if statement era: Fortran -> 1st order logic logic language / algol / "logic or" based / vector (array/struc): (n * m) -> don't need everything to complete current task(s) / (algebra or calculus) / mealy based Lisp -> 2nd order logic based language / applicative / "logic and" base / polynomial (tree/heap): (1-n) -> MUST have everything to complete current task(s) / (algebra and calculus) / moore based --- https://www.geeksforgeeks.org/difference-between-mealy-machine-and-moore-machine/ https://www.geeksforgeeks.org/difference-between-mealy-machi...
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- sargstuff 4y ago> from 'What Are the True Innovations of Lisp?': "... and realistically no programmer today cares about what made a language stand out 50 years ago. ..." "... re there any features that couldn’t be copied so easily into the various descendants of Algol? ..." Might be because there are no academic papers linking the ALGOL language issue(s)/bugs (that happen with regularity in languages such as C) and the applicative languages not having algo langueage issue(s)/bugs (such as lisp) because applicative languages support 1st class handling (and variations) of NIL, NUL, (), "", and ''
- deterministic 4y agoThe syntax is probably the only thing left that other languages haven’t copied/implemented? Directly exposing the AST to the programmer is a truly unique Lisp feature as far as I know. Maybe the ability to reprogram the Reader is another one that other languages haven’t copied?
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- sargstuff 4y agoWas. AST directly exposed (and can be manipulated during runtime) in python. So 'nada' ({ NIL, NUL, (), "", '' }) still 'lisp' exclusive/inclusive language feature. Python comes close, but NIL, NUL, (), "", '' are different implied types in python. Although, for non-lispers, python does get around () everything without having editor add in () before sending off to lisp REPL process.
- eslaught 4y agoAs the sibling noted, Python has a built-in AST parser [1] which I believe (not 100% sure) is used in libraries like Numba to JIT Python functions [2]. But fundamentally, the difference between built-in and provided as a library is not really as wide as it once was. Rust libraries use a third-party library for parsing code for procedural macros [3] which is pretty pervasive, and as I noted libclang for C++ is a thing (though definitely less common). So at least in my mind, the key difference in Lisp (for languages today) is not so much having this be a capability at all, it's more having it be expressed in terms of data structures lightweight enough that regular Joe programmer can pick them up and use them with relative ease. (Whereas, using Python's AST module and figuring out how to do code generation is definitely more than the average programmer is going to figure out.) Even the reader can be customized in some syntax-ful languages. Terra is not mainstream but it provides this [4]. There are probably others. [1]: https://docs.python.org/3/library/ast.html https://docs.python.org/3/library/ast.html [2]: https://numba.pydata.org/ https://numba.pydata.org/ [3]: https://crates.io/crates/syn https://crates.io/crates/syn [4]: https://terralang.org/api.html#embedding-new-languages-inside-lua https://terralang.org/api.html#embedding-new-languages-insid...