Re: re-using comma for read-time evaluation
Yann LeCun <[email protected]> Tue, 21 Oct 2008 16:08:25 -0400
| Newsgroups | gmane.lisp.lush.devel |
|---|---|
| Message-ID | <[email protected]> |
"_" is actually equivalent to "-" in Lush, so
my_variable is the same symbol as my-variable.
There are so-called "hash-macro-characters" in Lush
that are composed of "#" followed by another character,
just like #{ #}. I think #. or something like that might
be a good substitute for what you want to do with @.
I'd try to avoid non-backward compatible changes that
make the documentation more complicated.
-- Yann
On Tuesday 21 October 2008, Raymond Martin wrote:
> On 20 October 2008 17:53:12 Ralf Juengling wrote:
> > The macro-character @ allows evaluation of expressions
> > at read-time and, afaik, is mostly used when globally
> > defined constants occur in code to be compiled.
> >
> > I would like to use the @-character for something else
> > but still think we need a means for read-time evaluation.
> > How about re-using the comma character for this? I.e., a
> > comma occuring outside a backquoted expression would have
> > have the effect @ currently has. Also, I would define it
> > in sysenv, so no need to libload libc/constants anymore.
> >
> > Any objections or thoughts?
>
> I think that using an unbound character is a better idea than reworking an
> already bound one. The '_' is commonly seen in C/C++ in the names of macros
> (as well as for external linkage), plus it can be seen as the bottom part
> of the letter L. You are trying to make a shortcut, so '_' viewed as a
> shorter L (for lambda) might be a little way to remember its usage in
> practice.
>
> I did not check, but I don't think '_' is bound to anything.
>
> Raymond
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Lush-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lush-devel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/