Explanation of macros; Haskell macros

Kenny Tilton ktilton at nyc.rr.com
Wed Nov 5 10:40:10 EST 2003



Stephen J. Bevan wrote:

 >  However, lots
 > of people take the AWK-like approach because it works for them with
 > whatever language they are currently using.

But the question is "why macros?" Answer, so you do not have to use Awk.

Now you are in some fantasy-land where someone addresses a domain by 
creating a domain-specific langugae under Awk, then generates all their 
Java, Perl, Python, Ruby, PHP, and STP code from that. Cool! Is that in 
Matrix 4?

That was not an analogy, btw. I was already using the C switch statement 
to dispatch off an explicit "type" slot in C structs to achieve (what?) 
polymorphism when I heard about Smalltalk. I did not think "I already 
have that, however crappy and tedious to deal with when I come up with a 
new type". I thought, "Brilliant. Somebody thought to build that into a 
language."

But then I am not afraid to learn new languages.

kenny

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application





More information about the Python-list mailing list