top | item 32631322

(no title)

bkirkbri | 3 years ago

Same here. I never understood why a paren on the left of a function name “looks like fingernail clippings” but to the right it’s “just how code works.”

discuss

order

kazinator|3 years ago

We have to try to understand the non-strawman position of those who are genuinely turned off by Lisp syntax. The problem for them isn't the position of the parenthesis or the lack of commas: those things are probably fine for almost everyone.

In Lisps, this notation represents all structures in the program: definitions of functions, types and variables, control statements and so on.

For the users who have some kind of problem with that, it wouldn't be any better with the op(arg, ...) notation; and I suspect that most would agree that it's even worse.

(For that matter, most programmers don't actually have experience nesting the f(x, y, ...) notation to the same depth that is seen in Lisp programs. Anyone comparing a simple one-or-two-liner f(x, y, ...) with a modicum of nesting to Lisp code that runs for pages and pages is doing apples and oranges.)

jimbokun|3 years ago

Clojure takes this criticism to heart, and at least uses different delimiters for indicate different kinds of syntactic structures. Like () for classic lists, [] for arrays, {} for maps. Helps with visually detecting different kinds of structures in your code.

taeric|3 years ago

Sadly, I'm not convinced that there is much more than the straw man, honestly. Folks are predisposed to think it is a hard to read language. And this is on large because everyone says so.

Similarly, python. Is only a readable language because the community insists it is.

qsort|3 years ago

Larry Wall's remark was less about prefix notation and more about how there's very little visual difference. I don't necessarily agree with the criticism because that's the price you pay for homoiconicity, and it's a price well worth paying; but it was a more serious complaint than "lmao parentheses".

See e.g. Clojure, that introduced #{} for sets, [] for vectors etc.

agumonkey|3 years ago

It's funny cause to me visual differences in syntax are just useless information overload. And another dimension of constraints to deal with. That's why I clinged to low syntax languages.. you write in semantics almost. The rest is problem solving (or even extending metadomain with macros or else to help yourself)

Banana699|3 years ago

>that's the price you pay for homoiconicity

Well no but actually no. Mathematica is homoiconic, and it has tons of special syntax and sugar that all boils down to lists when you quote. Elixir also does this with a ruby-like syntax on top. Those are just the 2 I know of. Making the compiler available through a programmer-accessible API from within the program itself is the big idea, it has nothing to do with what the text grammar happens to be.

taeric|3 years ago

Another plus one here. The commas baffle me, as more languages decided to add optional trailing ones...