Selectors with underscores: Have your cake and eat it, too...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Selectors with underscores: Have your cake and eat it, too...

Andreas.Raab
Folks -

Attached my take on selectors with underscores. It basically separates
the issue of using underscores in assignment from the issue of using
underscores in selectors, puts this into two individual preferences, and
allows per-class scoping while providing a system-wide default.

The possible combinations of preferences are:

* allowUnderscoreAssignments off, allowUnderscoreSelectors: off
The use of underscores is forbidden, i.e., the Croquet model.

* allowUnderscoreAssignments on, allowUnderscoreSelectors: off
The classic Squeak usage; all of the following are assignments:

        a _ b => a := b
        b_ c => b := c
        d _e => d := e
        f_g => f := g.

* allowUnderscoreAssignments off, allowUnderscoreSelectors: on
The standard usage in other dialects

        a _ b => ((a) _) b
        b_ c => (b_) c
        d _e => (d) _e
        f_g => (f_g)

* allowUnderscoreAssignments on, allowUnderscoreSelectors: on
The hybrid usage requiring spaces around underscore for assignment:

        a _ b => a := b
        b_ c => (b_) c
        d _e => (d) _e
        f_g => (f_g)

This gives us a range of options to decide how to deal with it. I would
personally say that for the core image we should go with the first
option (disable underscores altogether) and only enable whichever option
we like for the release.

What do people think about this approach? I think it provides the most
options and gives us ample flexibility to decide what we'd like to use
down the road.

If there is no fundamental opposition I'll push it into the trunk in a
couple of days.

Cheers,
   - Andreas



Underscores.2.cs (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Casey Ransberger
Hmm...

 - Makes filing stuff into the image slightly more dangerous and confusing. (-1)
 - Satisfies all reasonable parties regardless of viewpoint on the matter. (+1)

Zero sum game I guess? Ship it.

On Fri, Mar 12, 2010 at 8:14 PM, Andreas Raab <[hidden email]> wrote:

> Folks -
>
> Attached my take on selectors with underscores. It basically separates the
> issue of using underscores in assignment from the issue of using underscores
> in selectors, puts this into two individual preferences, and allows
> per-class scoping while providing a system-wide default.
>
> The possible combinations of preferences are:
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
> The use of underscores is forbidden, i.e., the Croquet model.
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
> The classic Squeak usage; all of the following are assignments:
>
>        a _ b   =>              a := b
>        b_ c    =>              b := c
>        d _e    =>              d := e
>        f_g     =>              f := g.
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
> The standard usage in other dialects
>
>        a _ b   =>              ((a) _) b
>        b_ c    =>              (b_) c
>        d _e    =>              (d) _e
>        f_g     =>              (f_g)
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
> The hybrid usage requiring spaces around underscore for assignment:
>
>        a _ b   =>              a := b
>        b_ c    =>              (b_) c
>        d _e    =>              (d) _e
>        f_g     =>              (f_g)
>
> This gives us a range of options to decide how to deal with it. I would
> personally say that for the core image we should go with the first option
> (disable underscores altogether) and only enable whichever option we like
> for the release.
>
> What do people think about this approach? I think it provides the most
> options and gives us ample flexibility to decide what we'd like to use down
> the road.
>
> If there is no fundamental opposition I'll push it into the trunk in a
> couple of days.
>
> Cheers,
>  - Andreas
>
>
>
>



--
Casey Ransberger

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Ian Trudel-2
In reply to this post by Andreas.Raab
Andreas,

I like the manner you have presented this. Concise information. There
is a question that seems to be not addressed (or not as clear as I'd
like) in your email. What happen if one switches from one preference
to another after having extensively used it? Is there some kind of
conversion taking place?

Say, both are turned on, a programmer write a lot of "d _e => (d) _e".
Then I use the image and set allowUnderscoreAssignments on,
allowUnderscoreSelectors: off. What happens to the expression? Will it
become "d _e => d := e" ? That sounds nasty.

Ian.

2010/3/12 Andreas Raab <[hidden email]>:

> Folks -
>
> Attached my take on selectors with underscores. It basically separates the
> issue of using underscores in assignment from the issue of using underscores
> in selectors, puts this into two individual preferences, and allows
> per-class scoping while providing a system-wide default.
>
> The possible combinations of preferences are:
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
> The use of underscores is forbidden, i.e., the Croquet model.
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
> The classic Squeak usage; all of the following are assignments:
>
>        a _ b   =>              a := b
>        b_ c    =>              b := c
>        d _e    =>              d := e
>        f_g     =>              f := g.
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
> The standard usage in other dialects
>
>        a _ b   =>              ((a) _) b
>        b_ c    =>              (b_) c
>        d _e    =>              (d) _e
>        f_g     =>              (f_g)
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
> The hybrid usage requiring spaces around underscore for assignment:
>
>        a _ b   =>              a := b
>        b_ c    =>              (b_) c
>        d _e    =>              (d) _e
>        f_g     =>              (f_g)
>
> This gives us a range of options to decide how to deal with it. I would
> personally say that for the core image we should go with the first option
> (disable underscores altogether) and only enable whichever option we like
> for the release.
>
> What do people think about this approach? I think it provides the most
> options and gives us ample flexibility to decide what we'd like to use down
> the road.
>
> If there is no fundamental opposition I'll push it into the trunk in a
> couple of days.
>
> Cheers,
>  - Andreas
>
>
>
>



--
http://mecenia.blogspot.com/

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Andreas.Raab
On 3/12/2010 9:22 PM, Ian Trudel wrote:
> I like the manner you have presented this. Concise information. There
> is a question that seems to be not addressed (or not as clear as I'd
> like) in your email. What happen if one switches from one preference
> to another after having extensively used it? Is there some kind of
> conversion taking place?

No. If you switch the interpretation of underscores mid-way, you deserve
swift punishment and you shall receive it :-) This is supposed to be a
pretty static default and like I was saying I'd be in favor of
disallowing underscores altogether for baseline development. In which
case you'd turn on one or the other in situations where you may need it,
for example when porting code using underscore assignment, or when
loading a library that comes from a system using underscores.

> Say, both are turned on, a programmer write a lot of "d _e =>  (d) _e".
> Then I use the image and set allowUnderscoreAssignments on,
> allowUnderscoreSelectors: off. What happens to the expression? Will it
> become "d _e =>  d := e" ? That sounds nasty.

Existing expressions retain their interpretation unless you recompile.

Cheers,
   - Andreas

> 2010/3/12 Andreas Raab<[hidden email]>:
>> Folks -
>>
>> Attached my take on selectors with underscores. It basically separates the
>> issue of using underscores in assignment from the issue of using underscores
>> in selectors, puts this into two individual preferences, and allows
>> per-class scoping while providing a system-wide default.
>>
>> The possible combinations of preferences are:
>>
>> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
>> The use of underscores is forbidden, i.e., the Croquet model.
>>
>> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
>> The classic Squeak usage; all of the following are assignments:
>>
>>         a _ b   =>                a := b
>>         b_ c    =>                b := c
>>         d _e    =>                d := e
>>         f_g     =>                f := g.
>>
>> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
>> The standard usage in other dialects
>>
>>         a _ b   =>                ((a) _) b
>>         b_ c    =>                (b_) c
>>         d _e    =>                (d) _e
>>         f_g     =>                (f_g)
>>
>> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
>> The hybrid usage requiring spaces around underscore for assignment:
>>
>>         a _ b   =>                a := b
>>         b_ c    =>                (b_) c
>>         d _e    =>                (d) _e
>>         f_g     =>                (f_g)
>>
>> This gives us a range of options to decide how to deal with it. I would
>> personally say that for the core image we should go with the first option
>> (disable underscores altogether) and only enable whichever option we like
>> for the release.
>>
>> What do people think about this approach? I think it provides the most
>> options and gives us ample flexibility to decide what we'd like to use down
>> the road.
>>
>> If there is no fundamental opposition I'll push it into the trunk in a
>> couple of days.
>>
>> Cheers,
>>   - Andreas
>>
>>
>>
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Ian Trudel-2
2010/3/13 Andreas Raab <[hidden email]>:

> On 3/12/2010 9:22 PM, Ian Trudel wrote:
>>
>> I like the manner you have presented this. Concise information. There
>> is a question that seems to be not addressed (or not as clear as I'd
>> like) in your email. What happen if one switches from one preference
>> to another after having extensively used it? Is there some kind of
>> conversion taking place?
>
> No. If you switch the interpretation of underscores mid-way, you deserve
> swift punishment and you shall receive it :-) This is supposed to be a
> pretty static default and like I was saying I'd be in favor of disallowing
> underscores altogether for baseline development. In which case you'd turn on
> one or the other in situations where you may need it, for example when
> porting code using underscore assignment, or when loading a library that
> comes from a system using underscores.

All right. I believe it is not as much appealing as it would have been
with the conversion. I'm also wondering what kind of implications it
could have on the trunk. Won't it give additional worries (burden) if
people don't stick to a certain standard? To my understanding, it
could become a melting pot and it's not like recompiling will never
occur in the trunk. Swift punishment, you said... :)

Ian.
--
http://mecenia.blogspot.com/

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Andreas.Raab
On 3/12/2010 9:44 PM, Ian Trudel wrote:

> 2010/3/13 Andreas Raab<[hidden email]>:
>> On 3/12/2010 9:22 PM, Ian Trudel wrote:
>>>
>>> I like the manner you have presented this. Concise information. There
>>> is a question that seems to be not addressed (or not as clear as I'd
>>> like) in your email. What happen if one switches from one preference
>>> to another after having extensively used it? Is there some kind of
>>> conversion taking place?
>>
>> No. If you switch the interpretation of underscores mid-way, you deserve
>> swift punishment and you shall receive it :-) This is supposed to be a
>> pretty static default and like I was saying I'd be in favor of disallowing
>> underscores altogether for baseline development. In which case you'd turn on
>> one or the other in situations where you may need it, for example when
>> porting code using underscore assignment, or when loading a library that
>> comes from a system using underscores.
>
> All right. I believe it is not as much appealing as it would have been

Agreed. It would definitely be nicer with conversion. But I don't have
the time to do that and the proposed version addresses my concerns
because there's a simple story to tell people how to load stuff with
underscores: turn on the preference, load it, turn it back off, run
FixUnderscores.

> with the conversion. I'm also wondering what kind of implications it
> could have on the trunk. Won't it give additional worries (burden) if
> people don't stick to a certain standard? To my understanding, it
> could become a melting pot and it's not like recompiling will never
> occur in the trunk. Swift punishment, you said... :)

Yes, it could cause problems, like any feature that's abused :-) Thus my
preference for disallowing underscores altogether.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Stéphane Rollandin
In reply to this post by Andreas.Raab
> Attached my take on selectors with underscores. It basically separates
> the issue of using underscores in assignment from the issue of using
> underscores in selectors, puts this into two individual preferences, and
> allows per-class scoping while providing a system-wide default.

great !
...as we say in France: does it make coffee, also ?

> What do people think about this approach? I think it provides the most
> options and gives us ample flexibility to decide what we'd like to use
> down the road.

fine with me

Stef



Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Sam Adams-2
In reply to this post by Andreas.Raab

+1
But you may eventually need some kind of visual indicator in the browser showing what prefs were in place when the method was compiled.
Yuck.

Excellent job of handling the issue though.
Regards,
Sam


Sam S. Adams, IBM Distinguished Engineer, IBM Research
Mobile: 919-696-6064, email: [hidden email]
Asst: Kenndra K. Quiles. (732) 926-2292 Fax: (732) 926-2455, email: [hidden email]
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, I Corinthians 1:10>>


[hidden email] wrote on 03/12/2010 11:14:49 PM:

> Andreas Raab <[hidden email]>

> Sent by: [hidden email]
>

> 03/12/2010 11:14 PM
>
> Please respond to
> The general-purpose Squeak developers list <squeak-
> [hidden email]>

>
> To

>
> The general-purpose Squeak developers list <squeak-
> [hidden email]>

>
> cc

>
> Subject

>
> [squeak-dev] Selectors with underscores: Have your cake and eat it, too...

>
> Folks -
>
> Attached my take on selectors with underscores. It basically separates
> the issue of using underscores in assignment from the issue of using
> underscores in selectors, puts this into two individual preferences, and
> allows per-class scoping while providing a system-wide default.
>
> The possible combinations of preferences are:
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
> The use of underscores is forbidden, i.e., the Croquet model.
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
> The classic Squeak usage; all of the following are assignments:
>
>    a _ b    =>      a := b
>    b_ c   =>      b := c
>    d _e   =>       d := e
>    f_g   =>      f := g.
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
> The standard usage in other dialects
>
>    a _ b   =>       ((a) _) b
>    b_ c   =>      (b_) c
>    d _e   =>      (d) _e
>    f_g   =>      (f_g)
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
> The hybrid usage requiring spaces around underscore for assignment:
>
>    a _ b   =>       a := b
>    b_ c   =>      (b_) c
>    d _e   =>      (d) _e
>    f_g   =>      (f_g)
>
> This gives us a range of options to decide how to deal with it. I would
> personally say that for the core image we should go with the first
> option (disable underscores altogether) and only enable whichever option
> we like for the release.
>
> What do people think about this approach? I think it provides the most
> options and gives us ample flexibility to decide what we'd like to use
> down the road.
>
> If there is no fundamental opposition I'll push it into the trunk in a
> couple of days.
>
> Cheers,
>    - Andreas
> [attachment "Underscores.2.cs" deleted by Sam Adams/Raleigh/IBM]


Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Chris Muller-3
In reply to this post by Andreas.Raab
-1 so far.

I may not have thought this completely through, but this potentially
opens up another splinter of division; wherein some packages will use
underscore selectors, some won't.

So I suppose, at some point, those who would otherwise have underscore
selectors turned off, must turn them on to load and use such a
package?

I didn't see a response to the question about loading stuff in; will
we now start getting errors during load about my preference
incompatible with

Overall, to me it seems like a lot of complexity, not just for the
system but for the user to have to think about, all just to accomodate
a *naming preference* for RDBMS mapper softwares?  I say preference,
because, UNDERSCORE_COLUMN_NAMES can easily be converted to and from
smalltalkMethodNames.

I think we need to think this through..


On Sat, Mar 13, 2010 at 12:30 AM, Andreas Raab <[hidden email]> wrote:

> On 3/12/2010 9:22 PM, Ian Trudel wrote:
>>
>> I like the manner you have presented this. Concise information. There
>> is a question that seems to be not addressed (or not as clear as I'd
>> like) in your email. What happen if one switches from one preference
>> to another after having extensively used it? Is there some kind of
>> conversion taking place?
>
> No. If you switch the interpretation of underscores mid-way, you deserve
> swift punishment and you shall receive it :-) This is supposed to be a
> pretty static default and like I was saying I'd be in favor of disallowing
> underscores altogether for baseline development. In which case you'd turn on
> one or the other in situations where you may need it, for example when
> porting code using underscore assignment, or when loading a library that
> comes from a system using underscores.
>
>> Say, both are turned on, a programmer write a lot of "d _e =>  (d) _e".
>> Then I use the image and set allowUnderscoreAssignments on,
>> allowUnderscoreSelectors: off. What happens to the expression? Will it
>> become "d _e =>  d := e" ? That sounds nasty.
>
> Existing expressions retain their interpretation unless you recompile.
>
> Cheers,
>  - Andreas
>
>> 2010/3/12 Andreas Raab<[hidden email]>:
>>>
>>> Folks -
>>>
>>> Attached my take on selectors with underscores. It basically separates
>>> the
>>> issue of using underscores in assignment from the issue of using
>>> underscores
>>> in selectors, puts this into two individual preferences, and allows
>>> per-class scoping while providing a system-wide default.
>>>
>>> The possible combinations of preferences are:
>>>
>>> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
>>> The use of underscores is forbidden, i.e., the Croquet model.
>>>
>>> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
>>> The classic Squeak usage; all of the following are assignments:
>>>
>>>        a _ b   =>                a := b
>>>        b_ c    =>                b := c
>>>        d _e    =>                d := e
>>>        f_g     =>                f := g.
>>>
>>> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
>>> The standard usage in other dialects
>>>
>>>        a _ b   =>                ((a) _) b
>>>        b_ c    =>                (b_) c
>>>        d _e    =>                (d) _e
>>>        f_g     =>                (f_g)
>>>
>>> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
>>> The hybrid usage requiring spaces around underscore for assignment:
>>>
>>>        a _ b   =>                a := b
>>>        b_ c    =>                (b_) c
>>>        d _e    =>                (d) _e
>>>        f_g     =>                (f_g)
>>>
>>> This gives us a range of options to decide how to deal with it. I would
>>> personally say that for the core image we should go with the first option
>>> (disable underscores altogether) and only enable whichever option we like
>>> for the release.
>>>
>>> What do people think about this approach? I think it provides the most
>>> options and gives us ample flexibility to decide what we'd like to use
>>> down
>>> the road.
>>>
>>> If there is no fundamental opposition I'll push it into the trunk in a
>>> couple of days.
>>>
>>> Cheers,
>>>  - Andreas
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

johnmci

On 2010-03-15, at 10:29 AM, Chris Muller wrote:

> -1 so far.
>
> I think we need to think this through..


In my past experience with mapping you get funky things like _record_ or __record__ or record
So how do you map those three to _record_    let alone when they do _foo_bar_   and foobar
This also of course applies to FFI fields.  
--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Andreas.Raab
In reply to this post by Chris Muller-3
On 3/15/2010 10:29 AM, Chris Muller wrote:
> -1 so far.
>
> I may not have thought this completely through, but this potentially
> opens up another splinter of division; wherein some packages will use
> underscore selectors, some won't.

In theory, yes. But I don't think this is very likely. First, if we
declare usage of underscores illegal in all core images we've already
solved most of the problem. If we advocate to avoid underscore usage,
most people will follow our lead.

> So I suppose, at some point, those who would otherwise have underscore
> selectors turned off, must turn them on to load and use such a
> package?

Unless the package has the proper class annotations, yes. Hopefully this
will create pressure on the people who provide these packages to provide
proper class annotations and/or avoid using underscores.

> I didn't see a response to the question about loading stuff in; will
> we now start getting errors during load about my preference
> incompatible with

Yes. Just as you get errors right now if you're trying to load code with
underscore selectors, and just as you're getting errors right now if you
try to load code with underscore assignments in Croquet. The situation
isn't new; you are getting these errors already under various
circumstances. What's new is that you can do something about it.

> Overall, to me it seems like a lot of complexity, not just for the
> system but for the user to have to think about, all just to accomodate
> a *naming preference* for RDBMS mapper softwares?  I say preference,
> because, UNDERSCORE_COLUMN_NAMES can easily be converted to and from
> smalltalkMethodNames.
>
> I think we need to think this through..

That's what we're trying in this discussion. I understand your concern,
and largely agree with it. But the situation today isn't better - we're
getting errors already without being able to do anything about it. Glorp
patches the scanner; how's that for ugly?

My point is that we can lead by being consistent in saying no to
underscores altogether in the base system. This allows us to set the
release properties to whatever we decide the useful default is, while
allowing individual users or entire projects (Etoys for example) to
decide how they would like to use it.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Bert Freudenberg
On 16.03.2010, at 05:13, Andreas Raab wrote:

>
> On 3/15/2010 10:29 AM, Chris Muller wrote:
>> -1 so far.
>>
>> I may not have thought this completely through, but this potentially
>> opens up another splinter of division; wherein some packages will use
>> underscore selectors, some won't.
>
> In theory, yes. But I don't think this is very likely. First, if we declare usage of underscores illegal in all core images we've already solved most of the problem. If we advocate to avoid underscore usage, most people will follow our lead.
>
>> So I suppose, at some point, those who would otherwise have underscore
>> selectors turned off, must turn them on to load and use such a
>> package?
>
> Unless the package has the proper class annotations, yes. Hopefully this will create pressure on the people who provide these packages to provide proper class annotations and/or avoid using underscores.
>
>> I didn't see a response to the question about loading stuff in; will
>> we now start getting errors during load about my preference
>> incompatible with
>
> Yes. Just as you get errors right now if you're trying to load code with underscore selectors, and just as you're getting errors right now if you try to load code with underscore assignments in Croquet. The situation isn't new; you are getting these errors already under various circumstances. What's new is that you can do something about it.
>
>> Overall, to me it seems like a lot of complexity, not just for the
>> system but for the user to have to think about, all just to accomodate
>> a *naming preference* for RDBMS mapper softwares?  I say preference,
>> because, UNDERSCORE_COLUMN_NAMES can easily be converted to and from
>> smalltalkMethodNames.
>>
>> I think we need to think this through..
>
> That's what we're trying in this discussion. I understand your concern, and largely agree with it. But the situation today isn't better - we're getting errors already without being able to do anything about it. Glorp patches the scanner; how's that for ugly?
>
> My point is that we can lead by being consistent in saying no to underscores altogether in the base system. This allows us to set the release properties to whatever we decide the useful default is, while allowing individual users or entire projects (Etoys for example) to decide how they would like to use it.
>
> Cheers,
>  - Andreas

Sounds good to me.

And I'm pretty sure we'll get rid of underscore assignments in Etoys too. Since we don't use the bitmap fonts anymore it just looks plain ugly anyway. So newer code tends to use := already. It just has not been a priority so far to convert old code.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Selectors with underscores: Have your cake and eat it, too...

Andreas.Raab
In reply to this post by Andreas.Raab
With only four days to go until freeze, I wanted the change to be in so
that we could decide how to set the defaults after 4.1 is out. It'll
give us more options to decide how to deal with it.

Cheers,
   - Andreas

On 3/12/2010 8:14 PM, Andreas Raab wrote:

> Folks -
>
> Attached my take on selectors with underscores. It basically separates
> the issue of using underscores in assignment from the issue of using
> underscores in selectors, puts this into two individual preferences, and
> allows per-class scoping while providing a system-wide default.
>
> The possible combinations of preferences are:
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: off
> The use of underscores is forbidden, i.e., the Croquet model.
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: off
> The classic Squeak usage; all of the following are assignments:
>
> a _ b => a := b
> b_ c => b := c
> d _e => d := e
> f_g => f := g.
>
> * allowUnderscoreAssignments off, allowUnderscoreSelectors: on
> The standard usage in other dialects
>
> a _ b => ((a) _) b
> b_ c => (b_) c
> d _e => (d) _e
> f_g => (f_g)
>
> * allowUnderscoreAssignments on, allowUnderscoreSelectors: on
> The hybrid usage requiring spaces around underscore for assignment:
>
> a _ b => a := b
> b_ c => (b_) c
> d _e => (d) _e
> f_g => (f_g)
>
> This gives us a range of options to decide how to deal with it. I would
> personally say that for the core image we should go with the first
> option (disable underscores altogether) and only enable whichever option
> we like for the release.
>
> What do people think about this approach? I think it provides the most
> options and gives us ample flexibility to decide what we'd like to use
> down the road.
>
> If there is no fundamental opposition I'll push it into the trunk in a
> couple of days.
>
> Cheers,
> - Andreas
>
>
>
>