English Language is the best general purpose conveyance of arbitrary ideas, and it has syntax rules just like programming languages. It's "best" by the metric of being "easiest for humans to understand". That's what I mean by best, in this case.
I think one can argue that LISP is the "best" computer programming language based on a set of metrics that revolve around simplicity and composability. There's no simpler language. There simply cannot be, because there's nothing "extra" in LISP. It's the most compact (while still being human readable) way to define and/or call functions.
You can also argue that LISP is closer to English than any other programming language, because in English we use parenthesis's and lists to enumerate things related to what has been said. For example "(add, 1, 2)" is axiomatically the best way to express adding two numbers, in a way that scales to arbitrary numbers of operations. It's superior to "(1+2)" because the plus sign is a single character (cannot scale), and therefore there are a limited number of them, and using symbols means humans have to memorize them rather than simply reading their name. But "add" is a name one can read. Also "add one and two" is a valid English sentence, so all LISP programs are similarly valid English language expressions, where the parenthesis is merely used for grouping language "clauses".
If the world were ever to be forced to agree on one single high level programming language, it would necessarily need to be LISP for about 10 other huge reasons I could name: Everything from ease of writing parsers, to compression of code, simplicity, ease for learning, even as a young child, etc.
> English Language is the best general purpose conveyance of arbitrary ideas, and it has syntax rules just like programming languages. It's "best" by the metric of being "easiest for humans to understand". That's what I mean by best, in this case.
Given that most people alive today don't understand English at all, I don't think this claim holds up very well.
> For example "(add, 1, 2)" is axiomatically the best way to express adding two numbers, in a way that scales to arbitrary numbers of operations. It's superior to "(1+2)" because the plus sign is a single character (cannot scale), and therefore there are a limited number of them, and using symbols means humans have to memorize them rather than simply reading their name.
I'd be willing to wager that "1+2" is understood by far more people across the globe than "(add, 1, 2)".
* I use "English Language" as a synonym for "Human Language". However even if you want to be pedantic and interpret all my words in the literal sense, everything I said is still literally true.
> I use "English Language" as a synonym for "Human Language".
That was unclear given you kept calling out English, and not natural or human language more broadly in the rest of your comment. But I'll go with it.
> all my words in the literal sense, everything I said is still literally true.
No, they aren't. You need to make a stronger case than "Because I declared it axiomatically true".
+ has become part of nearly every language already, what's the value of picking one word (add) from one language (English) to replace it? Or to be more generous to say that every language should substitute for + whatever their language's word is. Now they can't communicate without a translator. Or, they could just use + as has been done for centuries. Why make things harder on ourselves?
The point about `(+ 1 2)` v.s. `1+2` is about the fact that the LISP syntax generalizes to all computations, whereas mathematical expressions do not. The beauty of LISP is that one simple syntax solves everything about computation in the axiomatically simplest way possible.
Lisp would be vastly less readable if the parentheses were removed, and arity had to be worked out according to the definitions of the functions and operators, understood to be working on an implicit operand stack.
Think about it: the entire class of error of mismatched stack height doesn't exist in Lisps.
There could be an operand stack, if the Lisp is translated to a stack-based byte code; but it's managed so the programmer isn't concerned about it.
Yeah, RPN is essentially what you'd get as output if you compiled LISP using a compiler. Claiming RPN is as easy to deal with as LISP would be utterly absurd, and no one genuinely believes that.
Well, RPN with parentheses, as a layer of syntax, would be easy to deal with. That's what Lisp backwards would be.
((a b +) (a b) add defun)
(((list pop) print) list while)
It helps me to read it in Japanese:
"A to B wo tasu, A to B no paramēta no aru, 'add' to iu kansuu wo 'defun' shite."
"lisuto wo 'pop' shite, sore wo insatsu shite, lisuto ga kara de nai aida ni"
Interesting things happen. When we think about how 'add' is called, we follow it from right to left, contrary to the direction of speech of the Japanese sentence. The function add is called, the (a b) parameters receive argument values and the (a b +) is evaluated.
However, the chained application expressed by nesting, which people complain about being backwards (so they need to invent piping/threading macros to go left to right) now reads left to right! We do have to evaluate the while condition first, but then the pop and print to left to right.
Yeah, the Japanese incorrectly put verbs at the end of the sentence! Just like Yoda does. Asian he must be. Incorrect they all are.
But seriously, yeah computers are naturally 'Stack Machines' [almost] always, where they need the arguments pushed onto a stack before the 'verb' is executed.
That's why we have interpreters and compilers: So we can make code easier to read. FORTRAN was originally invented as a way to let humans think in terms of parenthetical groupings for math and functions, specifically to _avoid_ reasoning in an RPN way.
Reverse Polish notation is every bit as easy, simple and minimal as Lispian prefix notation. They are mirror images of one another... and for most ordinary people, both are equally difficult to read or to use.
And I include myself in this.
Remember that for a lot of ordinary people, school algebra is almost impossible to follow and is the reason they stop studying maths as soon as they can. And that is simple infix notation.
Riddle me this then: When editing code full of parentheticals, why do devs find it helpful that IDEs can find and highlight the matching opening/closing parenthesis automatically? I mean, based on your logic, parenthesis just don't make things any easier, right? I'll leave the topic of "indentation" completely off the table too, because a single riddle is enough.
The parenthesis in LISP make it dramatically easier to deal with than RPN; and I don't believe for a millisecond that you objectively disagree with that fact.
> There's no simpler language. There simply cannot be, because there's nothing "extra" in LISP. It's the most compact (while still being human readable) way to define and/or call functions.
I guess you have not gotten into stack or array programming languages yet?
Forth is insanely compact and then there is APL which is a complete other ballpark.
Or check out Rebol for a homoiconic language in a very different syntax.
Lisp is amazing but oh boy there is whole other world out there. It is just one possible local optima. One that I personally love but not the only one.
I wouldn't exactly call APL simpler than LISP. Just because there are some things in APL that _can_ be coded with less characters doesn't make it overall simpler or even more compact in the general case. It's just axiomatic that for a language you need the ability to define and call functions, and it's just a debate about whether there's a simpler syntax than LISP or not, and I say there isn't.
> English Language is the best general purpose conveyance of arbitrary ideas, and it has syntax rules just like programming languages. It's "best" by the metric of being "easiest for humans to understand". That's what I mean by best, in this case.
This is the point I take issue with. I agree with you that lisp is the simplest and "best" programming language. Unlike lisp, there is no clear "best" natural language that is more simple and composable than all other natural languages (I know that's not what your claiming, just pointing that out). The dimension of your "best metric" for language is pretty bizarre though; all you are saying is that spoken/written language, in general, is better than grunts and pointing. If you actually compare the space of natural language and the space of programming languages, which is much more interesting imo, I think you would have to agree that non-lisp programming languages are more similar to natural language because their development was more practical and unprincipled than lisp.
The reason I say LISP is close to English is because it's syntax is purely a verb followed by objects, and there's [practically] no other symbols in the language other than parenthesis.
Since the word "best" always gets everyone's dander up on HN, I was very careful to point out we have to define our metrics (of comparison) before we can use that word, and that's precisely what I did.
I think one can argue that LISP is the "best" computer programming language based on a set of metrics that revolve around simplicity and composability. There's no simpler language. There simply cannot be, because there's nothing "extra" in LISP. It's the most compact (while still being human readable) way to define and/or call functions.
You can also argue that LISP is closer to English than any other programming language, because in English we use parenthesis's and lists to enumerate things related to what has been said. For example "(add, 1, 2)" is axiomatically the best way to express adding two numbers, in a way that scales to arbitrary numbers of operations. It's superior to "(1+2)" because the plus sign is a single character (cannot scale), and therefore there are a limited number of them, and using symbols means humans have to memorize them rather than simply reading their name. But "add" is a name one can read. Also "add one and two" is a valid English sentence, so all LISP programs are similarly valid English language expressions, where the parenthesis is merely used for grouping language "clauses".
If the world were ever to be forced to agree on one single high level programming language, it would necessarily need to be LISP for about 10 other huge reasons I could name: Everything from ease of writing parsers, to compression of code, simplicity, ease for learning, even as a young child, etc.