Interesting, I guess it's a good sign to see this kind of article on a more mainstream site like developerworks.
The open-brace, close-brace style of parenthesis placement is not very nice, though, and not idiomatic; and "then" and "else" in his examples aren't exactly reserved words. Still, kudos for trying to explain syntax-case macros.
Syntax-rules macros have a beauty worthy of Scheme. Syntax-case macros have a power worthy of Scheme. That the author's examples were not beautiful was not helped by syntax-case itself ;-)
Andy, who hacks a lot on syntax-case macros and an implementation thereof...
Funny... I thought the goal of metaprogramming was to eliminate boilerplate code. I suspect that's what they really meant here - maybe they phrased it that way to make the intent understandable to Java programmers.
It was worded a bit awkward, but again the goal is not to eliminate the boilerplate code, but to abstract it to a level where you only need to write it once.
[+] [-] wingo|16 years ago|reply
The open-brace, close-brace style of parenthesis placement is not very nice, though, and not idiomatic; and "then" and "else" in his examples aren't exactly reserved words. Still, kudos for trying to explain syntax-case macros.
Syntax-rules macros have a beauty worthy of Scheme. Syntax-case macros have a power worthy of Scheme. That the author's examples were not beautiful was not helped by syntax-case itself ;-)
Andy, who hacks a lot on syntax-case macros and an implementation thereof...
[+] [-] m0th87|16 years ago|reply
[+] [-] Zak|16 years ago|reply
Funny... I thought the goal of metaprogramming was to eliminate boilerplate code. I suspect that's what they really meant here - maybe they phrased it that way to make the intent understandable to Java programmers.
[+] [-] enntwo|16 years ago|reply
[+] [-] pasbesoin|16 years ago|reply
The art of metaprogramming, Part 1: Introduction to metaprogramming
http://www.ibm.com/developerworks/linux/library/l-metaprog1....
The art of metaprogramming, Part 3: Enterprise metaprogramming
http://www.ibm.com/developerworks/linux/library/l-metaprog3/