News for hackers. Stuff that matters.
Re:The Lisp Curse (2011) by Avshalom on Thursday February 25, 2016 @03:10PM (#11177405)
I am not. Syntax is the structure, semantics the meaning (I mean more or less).

(def (fun x y) (...)) is syntactically different than (def fun (x y) (...)) even if they are semantically equivalent.

Re:The Lisp Curse (2011) by Avshalom on Thursday February 25, 2016 @03:41PM (#11177624)
(3) vs 3 is a both really. In say smalltalk you can call 3 and it would return 3 because semantically it's an object where as in lisp it's not callable (even if in CL it may be represented as a CLOS object I don't know)

syntactical ( ) isn't actually a procedure call we can see this in (define (id x y) (..)) or (let ((x 3)) ...) in the theoretically pure Lisp semantically it's just a leaf in the tree but as part of an if-block in a real language it gets treated as procedure call even if it makes no sense.

Re:The Lisp Curse (2011) by greydius on Thursday February 25, 2016 @07:49PM (#11179115)
The syntax is the same. Both are s-expressions. The difference is how a particular implementation interprets them. In this example, it would depend on the semantics of def.
Re:The Lisp Curse (2011) by lispm on Friday February 26, 2016 @03:04AM (#11180334)
That's only the syntax of s-expressions - a data format.

The Lisp syntax is defined on top of s-expressions.

For example Common Lisp has a CASE operator. That's the EBNF syntax:

    case keyform {normal-clause}* [otherwise-clause] => result*
    normal-clause::= (keys form*) 
    otherwise-clause::= ({otherwise | t} form*) 
An example:

    (case id
      (10 (foo))
      (20 (foo) (bar))
      (otherwise (baz)))
The expressions are written using s-expressions as data. But still there is structure in those s-expressions, described by the EBNF syntax of CASE.

Every special operator and every macro provides syntax. Since users can write macros themselves, everybody can extend the syntax. On top of s-expressions.

Re:The Lisp Curse (2011) by greydius on Friday February 26, 2016 @07:48AM (#11181080)
That is interesting. I've always considered lisp in terms of denotational semantics. In fact, I wrote a toy lisp in which the complete grammar was basically

    list -> ({symbol | number | string | list}*)
and then it was up to the interpreter to decide the meaning of special forms. (I say "basically" because there was also desugaring of '(...) to (quote ...)).