Underscores in Identifiers (was: Re: Random and unsolicited
feedback on 3.9a)
ducasse at iam.unibe.ch
Sat Nov 19 13:09:03 UTC 2005
On 19 nov. 05, at 11:58, Bert Freudenberg wrote:
> When dealing with low_level_code, I'd love to have underscores in
> identifiers - not even just method names, but for variables, too.
Gloops. I'm not sure I would like to have that. :)
Because when I see foo_bar in the code I have to know that this is a
variable and not foo _ bar.
I have the impression that we have lot of work in other places to let
this one stable :)
> 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 ;-)
This is why I would love to remove caseOf: too :)
> 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?
I thought that we could assign a compiler class to a class. At least
in VW this was that way that roel
loaded Prolog like methods with a file in.
So I would avoid the preferences plague. But make sure that the
superclass returned a specific compiler
and may be fix that changing the compiler of a class is working if it
is not currently.
This way we have a stable kernel but people can extend it.
> - 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.
>> - Andreas
>> Bill Schwab wrote:
>>> I'm not sure what to make of this. It seems that I'm probably
>>> something, but here is my attempt at "asking the community"
>>> I doubt it will seriously complicate the ultimate fix, and
>>> corrects one
>>> removeable singularity while we wait. Do you want to include it?
>>> I suggest you to ask what the community wants and we will include if
>>> this is ok.
>>>> With tongue only partly in cheek, how about this one:
>>>> I will admit that removing the entanglement of _ with assignment is
>>>> preferable, but having the ability to include _ anywhere but the
>>>> character of a selector is a huge down payment. Why is this not in
>>>> mainstream image? It would be huge help to those of us with RDB
>>>> 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