From: John Cowan <[email protected]> Subject: Re: [r6rs-discuss] Proposed features for small Scheme, part 1: a stake in the ground Date: Fri, 18 Sep 2009 10:36:53 -0400
> Alaric Snell-Pym scripsit: > > > In effect, you're not all *that* keen on macros, I guess. I certainly > > agree that it's easy to overuse them; certainly, any problem that can > > be well solved with only higher-order functions and other such tools > > should be, rather than going to macros (which aren't first-class, for > > a start). > > +1. I am not against macros, merely against their injudicious use. > > > But I'm interested in PL research; I'd quite like to write entire new > > languages as Scheme macros whose expanders are basically a "compiler > > into Scheme", so that I can embed them in Scheme code and intermingle > > them, thereby using whatever language is best for the problem at hand. > > Whereas I'd much rather write an interpreter in Scheme. I do use local macros in production code time to time, for the purpose of implementing a mini DSL. (I mean macros that implicitly refer to the lexically scoped variables; let(rec)-syntax in Scheme, or unhygienic macros in CL.) The same functionality can be achieved with local procedures, though I sometimes choose macros to make the implementation emit optimal compiled code. In a sense, I compensate weakness of the implementation by macros---if the compiler is smart enough I'd go for procedural abstractions. But having optimal code *now* is sometimes important in the production code. So, I'd like let(rex)-syntax to be kept for a practical reason. --shiro _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
