4 ms·
The parentheses give you Macros, a completely uniform calling convention, and the "everything's an expression" programming style. These are arguably the things
by fungiblecog 7y ago
The parentheses give you Macros, a completely uniform calling convention, and the "everything's an expression" programming style. These are arguably the things you cannot get from a non-lisp language. Almost everything else varies between lisp implementations.
The lack of syntax matters in the sense that once you don't have any you realise that it just gets in the way. Having lots of parentheses is a small price to pay for powerful tools so that's why "it doesn't matter". Non-lispers generally don't understand how lisp is different from their language of choice and therefore don't understand why the lack of syntax is an advantage.
- rusini 7y agoThe syntax of S-expressions is the syntax. It's a form to serialize trees (made out of pairs) and it is described by some grammar.
- lispm 7y ago> The syntax of S-expressions is the syntax. of s-expressions. Lisp has an additional layer of syntax on top of s-expressions. For example the DEFINE-CONDITION operator has this syntax: define-condition name (parent-type*) ({slot-spec}*) option* => name slot-spec::= slot-name | (slot-name slot-option) slot-option::= [[{:reader symbol}* | {:writer function-name}* | {:accessor symbol}* | {:allocation allocation-type} | {:initarg symbol}* | {:initform form} | {:type type-specifier} ]] option::= [[(:default-initargs . initarg-list) | (:documentation string) | (:report report-name) ]] function-name::= {symbol | (setf symbol)} allocation-type::= :instance | :class report-name::= string | symbol | lambda expression with even more syntax for things like lambda expressions and type specifiers.
- rusini 7y agoI know :) And that's cool, and that property is the base of my own programming language. I am also trying right now to find some explanation why it's cool based on some fundamental conclusions from theoretic computer science... I just feel that when someone says that Lisp does not have syntax or that syntax is not important, it's plain wrong...
- lispm 7y ago> I just feel that when someone says that Lisp does not have syntax or that syntax is not important, it's plain wrong... I completely agree. I just feel that not every programming language needs to have the same approach to syntax. Lisp is different from most languages in its way to have a data syntax in which programs are written. Thus the data syntax is textual (s-expressions) and the program syntax is structural (based on data structures like lists, symbols, numbers, ..).
- kazinator 7y agoLet's put it this way: Every function and macro description in the HyperSpec has a "Syntax:" synopsis right at the top. Section 2 of the standard is "Syntax".