From: Joel VanderWerf Date: 2003-07-17T07:53:59+09:00 Subject: Re: Other languages' features in Ruby Phil Tomson wrote: > In article , > Ben Giddings wrote: ... >>On Wednesday, July 16, 2003, at 09:36 AM, Peter Hickman wrote: ... >>>Lisp programmers have enquired about macros (occasionally). >> >>Are there good ways of doing what Lisp macros do for you? > > > Perl has input filters (see the perlfilter docs) that sort of act like a pre-processor > for yout source. This was originally intended for encrypting source-code, but now is > used for lots of other purposes. Perl even has a command line argument (-p, I believe) > that will pass the source through the c pre-processor before Perl interprets it. > > I wonder how difficult it would be to do input filters for Ruby? > > On the otherhand, it's probably not a feature needed in Ruby as much as it is in Perl. Would the filter operate on strings or parse trees? Strings wouldn't satisfy the Lisp folks, because they're used to s-expressions.