Is metaprogramming useful?

Steve Horne stephenwantshornenospam100 at aol.com
Wed Nov 29 13:25:54 PST 2006


I have the definite feeling that I'm confusing myself at the moment
:-(


On Wed, 29 Nov 2006 15:57:03 -0500, Brad Anderson <brad at dsource.org>
wrote:

>Understood.  lambda-the-ultimate.org is a programming language discussion
>site, iirc.  Here's the google cache:
>
>http://216.239.51.104/search?q=cache:o2sGhHoc57cJ:lambda-the-ultimate.org/node/1605+lisp+associativity&hl=en&gl=us&ct=clnk&cd=6

OK.

On a quick scan through that, there doesn't seem to be anything to say
that Scheme macros can do associativity and precedence. That's fine by
me, as I don't feel quite as stupid as I did a minute ago ;-)

It's an interesting link. There's a lot of languages mentioned that I
have only a very superficial knowledge of - e.g. I've played with
Prolog a bit, but although I knew there's parsing stuff there, I never
used it. The 'take a look at prolog' bit of your link makes it look
interesting, though.

Defining Haskell operators seemed easy, but there was something that
worried me about it - can't remember what.

A major issue mentioned on that link is having different precedence
and associativity in different bits of the code. In Scheme, using
quoting, that's not a problems of course - any more than if quoting
meant text strings as opposed to lists of tokens. The area where a
particular syntax applies is delimited. A related issue *may* have
been one of my Haskell concerns, though even if it was there's a
danger that I was reasoning from ignorance.

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list