3 ms·
I don't know much about Lisp. But you do realize you're asking sort of the following right? Roman: what's so amazing about the decimal system? I can do additio
by mettamage 5y ago
I don't know much about Lisp. But you do realize you're asking sort of the following right?
Roman: what's so amazing about the decimal system? I can do addition just fine with X + X = XX.
Modern human: Well... you can do negative numbers easily, irrational numbers, you can show zero easily.
Roman: bah! I don't know what you're talking about. Half those numbers don't even exist.
Mathematician: actually have you heard about complex numbers?
The point is: you have to learn a new way of thinking compared to procedural/OOP style programming. And it might be the case that the problems it solves are not practical for your use-case.
I tell you, as a non-Lisp programmer, what I find amazing about Lisp. Disclaimer: I may be partially or completely wrong. I'm really not the one who should be writing this, but since our knowledge of Lisp isn't that far apart, I might be able to empathize with your perspective a bit more since I have been in it.
* Your code is the abstract syntax tree! Don't know what an abstract syntax tree is? It's a data structure that compilers use in order to generate code. In normal languages you have to first parse the language, compile it to the abstract syntax tree and then generate machine code from it. However, in the case of Lisp, it's already there. So this means that you can write compiler-esque programs much easier.
* One of the nice things that a direct AST provides that it allows partial live reloading of code. Imagine this:
```
myAge = 17
if (myAge >= 18) {
print("Nice!")
} else {
print("Hello youngster!")
}
```
With Lisp, you can basically swap out the first print function for another function while the program keeps running.