Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, for regular macros, only if your C syntax was in a string. Otherwise, lisp would try to tokenize it, and choke. Heck, if your lisp of choice offers an eqivalent of TCL's uplevel, you wouldn't even need a macro, just a function.


> Well, for regular macros, only if your C syntax was in a string. Otherwise, lisp would try to tokenize it, and choke.

Which is why I said normal (rather than reader) macros could do a "basically C-like syntax" but with Lisp tokenization rules.


What would that look like?


  ((:include "stdio.h")
  
  (const char * message = "Like this.\n")
  
  (int main ((int argc) (char * * argv))
    (printf message)
    (return 0)))


Ah.




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

Search: