[squeak-dev] Can i has underscores? :)
siguctua at gmail.com
Wed Apr 14 10:36:44 UTC 2010
On 14 April 2010 13:25, Alexander Lazarević <laza at blobworks.com> wrote:
> After setting the "Allow underscore selectors" preference to true in
> 4.1.1 I just created a class MyClass with the method foo_bar and
> MyClass new foo_bar returns 10?!
> I can't say why the note about the new sources file pops up on this though.
Oh, so, i could use underscores in trunk?
I just missed the notice that it is adopted already.
Is there an option to use a per-class setting, instead/in addition of
a system-wide one?
> 2010/4/14 Igor Stasenko <siguctua at gmail.com>:
>> I checked, that in Pharo image i could simply use:
>> a_b := 5.
>> FOO_BAR := 10.
>> ^ FOO_BAR
>> and it works!
>> It would be cool to have similar in squeak, even if it may require to
>> define something like:
>> MyClass class>>canIHasUnderscores
>> ^ true
>> It would be really nice to have, especially for things like OpenGL
>> API, which using underscores in constant names.
>> Exterminating underscores in those identifiers makes them really hard
>> to read , and awkward to use, because
>> every time you going to code something, first you usually refer to
>> docs, where you see these names with underscores,
>> but then once you going to type this name it costs you an additional
>> mental effort - don't forget to skip underscores.
>> Best regards,
>> Igor Stasenko AKA sig.
Igor Stasenko AKA sig.
More information about the Squeak-dev