chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] macro systems and chicken (long)


From: Alaric Snell-Pym
Subject: Re: [Chicken-users] macro systems and chicken (long)
Date: Sat, 5 Apr 2008 13:03:15 +0100


On 4 Apr 2008, at 7:32 pm, John Cowan wrote:

I suppose that syntax extension is one thing, arbitrary compile-time
programming is another.  It's useful to be able to express common
patterns directly in the language, but I don't see the point of
running code in the compiler, which is a rather constrained
environment.

It's not constrained in ways that worry me, though. Well, it's not
really constrained at all, except by common sense (one must be aware
that the compilation and the running might well be on different
systems, that sort of thing)

In such a case I would write a compiler in Scheme directly,
using the run-time facilities rather than macros, and either
compile or interpret the result.

But then it's not seamlessly and lightweightly integrated with the
rest of your code; it's like the old days of compiling .c and .f
and .s files into .os then linking them together to achieve multi-
language programs...

I'm talking about things like macros that simplify matrix-algebraic
expressions, unrolling things and using knowledge of matrix
identities and so on, so you can write matrix arithmetic in a natural
form yet have it automatically implemented efficiently, that sort of
thing.

In short, I'd rather have a pipeline of program transformers rather
than a multi-phase monolith.

I'd say that if you find separate program transformers better than
macros, then the macro system needs fixing :-)

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4






reply via email to

[Prev in Thread] Current Thread [Next in Thread]