[Prev][Next][Index][Thread]
with-foo ( foo = args ) (was Re: Critique this macro, please)
in article ehp14t4jk5j5qu8f13m1gslni40q07j05t@4ax.com, Jason Trenouth at
jason@harlequin.co.uk wrote on 2000.12.20 9:36 AM:
> with-file-sequence ( file = "foo.txt", delimiter: '\n' )
By the way, anybody know why "=" was chosen for this idiom? It seems a
little misleading to me, especially in the simple case of one argument,
since the arguments aren't being assigned to foo. I can see why "=" is
appealing here, to highlight that foo will be assigned to, but it seems to
me something else might make more sense here, like "in", "from", "<=" or
perhaps something slightly more radical like:
with-file-sequence file <= ( "foo.txt", delimiter: '\n' )
Although I don't think Dylan can handle a macro with this syntax, and anyway
this probably reads incorrectly, implying that "file" is a file-sequence,
but I think it helps separate the binding from the arguments better.
--
Chris Page
let mailto = concatenate( "page", "@", "best.com" );
Follow-Ups:
References: