Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Explanation of macros; Haskell macros

Reply
Thread Tools

Re: Explanation of macros; Haskell macros

 
 
Michael T. Babcock
Guest
Posts: n/a
 
      11-03-2003
>
>
>The costs: syntax seems to be constrained to have a very regular surface
>structure full of parentheses; the language must describe and implement a
>representation of code as data which would otherwise be unnecessary; every
>compiler must include an interpreter; it's hard to report errors to the
>user showing the code as it's written in the source if the error is found
>after macro expansion.
>


I don't really want to jump into the middle of a discussion here, but if
someone wanted to do this in Python, one *can* of course write Python
code that generates Python code and then executes it. This gives the
compile-time type macro execution timeframe; build the code you want to
execute with Python before executing it then execute it. There's no
need for an additional macro-like system when your runtime allows you to
execute your own strings.

I know this is a higher-order discussion on the merits of macro systems
in other languages and how they'd benefit (or not) Python, but I decided
to throw my $0.02 (CAN) in.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
playing with berp: python3 to haskell compiler in haskell Alia Khouri Python 0 10-31-2010 08:16 AM
Hubris connects Ruby to Haskell, will there be such a connection between Python and Haskell? Casey Hawthorne Python 3 02-17-2010 10:31 AM
Explanation of macros; Haskell macros mike420@ziplip.com Python 80 11-07-2003 02:22 AM
Re: Explanation of macros; Haskell macros mike420@ziplip.com Python 5 11-01-2003 01:09 AM
Re: Explanation of macros; Haskell macros mike420@ziplip.com Python 1 10-07-2003 04:07 PM



Advertisments