Hacker News new | past | comments | ask | show | jobs | submit login

Yeah, but it's more about macros semantics rathen than syntax in general sense.



Macros implement syntax and semantics. Arbitrary complex syntax. Check out the complex syntax for DEFGENERIC, DEFCLASS, DEFSTRUCT, defpackage ... LOOP

The syntax for DEFUN in Common Lisp:

  defun function-name lambda-list [[declaration* | documentation]] form*
The syntax for lambda-list then is:

  lambda-list::= (var* 
                  [&optional {var | (var [init-form [supplied-p-parameter]])}*] 
                  [&rest var] 
                  [&key {var | ({var | (keyword-name var)} [init-form [supplied-p-parameter]])}* [&allow-other-keys]] 
                  [&aux {var | (var [init-form])}*]) 
Lisp syntax is not atom | '(' atom* ')'. It's much more complex.

And so on.

Every Lisp has arbitrary complex syntax due to macros and special operators.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: