lua-users home
lua-l archive

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



> RLake@oxfam.org.uk wrote:
> >
> > [...] In fact, I'd go for something even more radical: if it's
> > not a reserved symbol and it prints, it's a valid identifier character.

> How do you know whether "it prints"?  Characters that are printable on
> one system may be control characters on another (i.e. 0x7f-0xa0 range;
> even 0x00-0x1f holds printable characters on some systems).

True enough. "If it prints on my system" :-) Reserving iso ccontrol
characters
would not be a bad thing.

> > Leaving all that aside, there is no earthly reason why I shouldn't use
> > whatever character makes me feel good inside of an identifier,
providing
> > that it's not being used by the language for some other purpose. Given
that
> > I use iso-8859-1, why should I not use «foo» as an identifier? (perhaps
I
> > like global variables to stand out.) Does this hurt anything?

> First you flame about people using locale specific features and now that?
;-)

One thing is locale-specific features being used for language/system
semantics. My personal semantics (the name of an identifier) is completely
different. I've gotten used to the fact that VBA changes all the built-in
operators from some odd version of English to some odd version of Spanish
when I install Excel in Spanish, but it makes it harder for me to think up
identifier names which don't duplicate system names. It shouldn't do that.
However, it doesn't matter what language my identifiers are in.

> I want to see you when you get the first file from a system that uses
smileys,
> playing card symbols, or an em-dash within identifiers *g*.

Dylan (and Scheme) allow you to use any character you want in an
identifier. Once you get used to that feature, it gets really useful. I
personally might want to use a smiley or a frowny:
   while :-)

If I were writing a bridge program, why shouldn't I use playing card
symbols for certain variables? It might make more sense to someone reading
the code in another language.

> IMHO, a programming language should use a well defined and system
independent
> character set.  The characters which may be used in Lua identifiers is
> undefined and system dependent.  Bad.

I agree 100%. The question is simply what the set should be. My argument is
that making the set bigger doesn't hurt anything.

R