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

Sam Adams ssadams at us.ibm.com
Mon Mar 15 13:32:22 UTC 2010


+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: ssadams at us.ibm.com
Asst: Kenndra K. Quiles. (732) 926-2292 Fax: (732) 926-2455, email:
Kenndra at us.ibm.com
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, I Corinthians 1:10>>


squeak-dev-bounces at lists.squeakfoundation.org wrote on 03/12/2010 11:14:49
PM:

> Andreas Raab <andreas.raab at gmx.de>
> Sent by: squeak-dev-bounces at lists.squeakfoundation.org
>
> 03/12/2010 11:14 PM
>
> Please respond to
> The general-purpose Squeak developers list <squeak-
> dev at lists.squeakfoundation.org>
>
> To
>
> The general-purpose Squeak developers list <squeak-
> dev at lists.squeakfoundation.org>
>
> 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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100315/561561a3/attachment.htm


More information about the Squeak-dev mailing list