f (x, y, z)
becomes (f x y z) f (x, y, z)
becomes (f x y z)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.)
(psetq x y y x)
You can easily have a nesting reduced binding macro, like (var (x 1 y 1) (list x y)), with sequential binding.Untested:
(defmacro var (pairs &body body)
(if (oddp (length pairs))
(error "~s: variables and init-forms must occur pairwise" 'var))
`(let* ,(loop for (var init) on pairs by #'cddr
unless (and var (symbolp var)
(not (eql var t))
(not (keywordp var)))
do
(error "~s: ~s isn't a variable name" 'var var)
collect (list var init))
,@body)))Similarly, python. Is only a readable language because the community insists it is.
See e.g. Clojure, that introduced #{} for sets, [] for vectors etc.
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.