Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hygenic Macros

Name: Anonymous 2012-07-01 19:18

Can someone explain to me when to use scheme's syntax, quasisyntax, unsyntax, and unsyntax-splicing.

Name: Anonymous 2012-07-01 20:20

Never.  Use defmacro and gensyms.

Name: One Happy Nigga 2012-07-01 21:05

A real nigga would just embrace fexprs and dynamic scoping.

Name: Anonymous 2012-07-01 21:57

>>2
So the hygienic macros in R5RS and later are shit?

>>3
That shit is out of date.

Name: Anonymous 2012-07-01 22:12

Use quasi/unsyntax{,-splicing} when you need to inject a non-syntax-object inside a syntax-object, like you would with quasiquote/unquote{,-splicing}
syntax for anything else.

Name: Anonymous 2012-07-01 22:19

Also, the reason I'm asking, I'm looking at implementing a minimal compiled Lisp/Scheme on LLVM and I'm just wondering which direction I should take. I was going to go with Scheme, but looking at the Hygienic Macro SFRI was rather mind-numbing, and I was wondering if I should just skip it. I'm half thinking "just fuck it" and modeling my toy project off of Clojure in terms of syntax and semantics, and then just add in tail calls, Scheme style number/real/complex syntax, and raw string literals. Implement the secondary forms with macros where I can, write a simple code generator and let LLVM do most of the optimization work.

Name: Anonymous 2012-07-02 1:47

>>6
I'm just wondering which direction I should take
look at how javascript solves these problems

Name: Anonymous 2012-07-02 6:41

>>6
This will help you a lot. Or, at least, it did help me.
http://www.cs.indiana.edu/~dyb/pubs/bc-syntax-case.pdf

Please, don't implement yet another broken defmacro system.

Name: bampu pantsu 2012-07-06 4:52

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List