chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] plain lambdas as syntax transformers


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] plain lambdas as syntax transformers
Date: 13 May 2013 11:51:16 +0200

On May 13 2013, Peter Bex wrote:

On Mon, May 13, 2013 at 10:44:53AM +0200, Felix wrote:
Hello!

Hi!

I know this is going to be controversial, but I'd like to un-deprecate
the use of plain procedures as syntax-transformers. The way it is
currently implemented, using a procedure can be seen as a simple
default (er-transformer). I find the use of transformer-constructors
clutters up the code, adds unnecessary typing and indentation, and is
more or less meaningless for newbies.

I'm a bit undecided about this.  I think you're right in that the
additional typing is a bit pointless, considering ER transformers
are the "native" system.

However, it's confusing to newbies, you can't really explain what
exactly er-transformer *does*.  Also, the extra typing isn't that bad
and I'm not sure we should be subtly encouraging the use of ER
transformers over IR transformers by making them less work to type
(IR transformers are safer unless you know exactly what you're doing).

While I'm currently struggling and failing (at seen on chicken-users)
to replace something easily done in the unhygienic way with some portable
and hygienic code... I'd like to second Peters argument here.

One more identifier and indent level is not that bad.  (It could even
be avoided simply by a macro instead of the lambda keyword.)

But the subtle damage it does to the newbies brain when reading
existing code to learn… that's bad.


Finally, I find that I don't tend to use that many macros at all, and
if I use macros, they're usually syntax-rules unless I need programmatic
generation of code, or if I need to break hygiene.  And then I tend
to prefer IR transformers because they require less (r 'foo) nonsense.
So er-macro-transformer is not something I use often, therefore I
don't see much benefit in making it less work to type them in.

Cheers,
Peter





reply via email to

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