Underscores in Identifiers (was: Re: Random and unsolicited
feedback on 3.9a)
Bert Freudenberg
bert at impara.de
Sat Nov 19 10:58:23 UTC 2005
When dealing with low_level_code, I'd love to have underscores in
identifiers - not even just method names, but for variables, too.
This could probably be achieved simply by using a different type
table with $_ being an #xLetter in Scanner (not sure about the SmaCC-
based Compiler).
However, I would also strongly suggest *not* to allow this as a
standard. Apart from breaking old code file-ins, we would soon get
tons of unreadable gibberish by C-trained newbies ;-)
Instead, when filing in, the compiler would interpret underscores as
assignment, just as it is now. *Only* if specifically enabled by the
filed-in code would it be switched to allow underscores in
identifiers. Same goes for normal development - *unless* a class
answer true when asked #allowUnderscoresInIdentifiers, underscores
are compiled as assignments. The file-out code would take that into
account to generate the code snippet enabling underscores in
identifiers needed for later file-in.
How does that sound?
- Bert -
Am 19.11.2005 um 01:39 schrieb Andreas Raab:
> Can we please consider the consequences of doing that (like
> potentially breaking lots of code from fileIns) and how we are
> going to deal with it *before* such a change gets included? I would
> hate it to have another one of those situations where things break
> for absolutely no good reason.
>
> Cheers,
> - Andreas
>
> Bill Schwab wrote:
>> Gang,
>> I'm not sure what to make of this. It seems that I'm probably
>> missing
>> something, but here is my attempt at "asking the community" including
>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-
>> October/045216.html
>> I doubt it will seriously complicate the ultimate fix, and
>> corrects one
>> removeable singularity while we wait. Do you want to include it?
>> Bill
>> I suggest you to ask what the community wants and we will include if
>> this is ok.
>> Stef
>>> With tongue only partly in cheek, how about this one:
>>>
>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-October/
>>> 045216.html
>>>
>>> I will admit that removing the entanglement of _ with assignment is
>>> preferable, but having the ability to include _ anywhere but the
>>> first
>>> character of a selector is a huge down payment. Why is this not in
>>> the
>>> mainstream image? It would be huge help to those of us with RDB
>>> centric
>>> uses for _ in selectors.
>> Wilhelm K. Schwab, Ph.D.
>> University of Florida
>> Department of Anesthesiology
>> PO Box 100254
>> Gainesville, FL 32610-0254
>> Email: bills at anest4.anest.ufl.edu
>> Tel: (352) 846-1285
>> FAX: (352) 392-7029
>
More information about the Squeak-dev
mailing list
|