Authorize upArrow in binary symbols

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

Re: OT returning things. was: Re: [squeak-dev] Authorize upArrow in binary symbols

Georg Gollmann

Am 26.02.2014 um 23:36 schrieb Tobias Pape <[hidden email]>:

> PS: I really like to write 2^31 - 1 and have it be valid Smalltalk…

You could easily write it the Fortran way: 2**31 - 1

Kind regards
Georg



Reply | Threaded
Open this post in threaded view
|

Re: OT returning things. was: Re: [squeak-dev] Authorize upArrow in binary symbols

Nicolas Cellier

2014-02-27 9:05 GMT+01:00 Georg Gollmann <[hidden email]>:

Am 26.02.2014 um 23:36 schrieb Tobias Pape <[hidden email]>:

> PS: I really like to write 2^31 - 1 and have it be valid Smalltalk…

You could easily write it the Fortran way: 2**31 - 1

Kind regards
Georg


Or if it's just 2 you want to raise, the highly obfuscated 1<<31 - 1 already work in Squeak ;)



Reply | Threaded
Open this post in threaded view
|

Re: Authorize upArrow in binary symbols

J. Vuletich (mail lists)
In reply to this post by Levente Uzonyi-2
Quoting Levente Uzonyi <[hidden email]>:

> On Mon, 24 Feb 2014, J. Vuletich (mail lists) wrote:
>
>> Quoting tim Rowledge <[hidden email]>:
>>
...

>>> I wish we still had a proper up arrow rather than a caret, not to  
>>> mention the proper left arrow assign instead of the nonsensical  
>>> Pascal :=.
>>
>> StrikeFont allInstancesDo: [ :each | each useLeftArrow ]
>
> That solves the problem, but it makes another. We lose underscore  
> character with that change. :)
>
>
> Levente
>
>>
>> :)

Well, yes. Another possibility that might please some is to use Shout.  
At least in Cuis, Shout can show all assignments as  
underscore/leftArrow or as ':=' (or just let them alone).

It wouldn't be hard to tweak this to show the proper code point for  
left arrow, or an unused 8-bit character code, binding it to the left  
arrow glyph. In that way, regardless of the user typing '_' or ':=',  
when method is saved, it would be shown as left arrow.

(Another tweak is needed. When modifying existing code, this new  
character would in the source code instead of '_' or ':=', so it is  
needed to tweak the parser to accept it.)

That would give, at the same time, underscores for C lovers and left  
arrow assignments for classic Smalltalk lovers. Maybe people in both  
groups would like it.

Cheers,
Juan Vuletich


Reply | Threaded
Open this post in threaded view
|

Re: Authorize upArrow in binary symbols

timrowledge

On 28-02-2014, at 5:07 AM, J. Vuletich (mail lists) <[hidden email]> wrote:
>
> Well, yes. Another possibility that might please some is to use Shout. At least in Cuis, Shout can show all assignments as underscore/leftArrow or as ':=' (or just let them alone).

That’s a nice idea. It would even have the side-benefit of making me see the point of Shout…

I don’t imagine it would be much more difficult to do something with the ^, displaying a nice arrow when it will be interpreted as a return and ^ if it is seen as a message-part.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
"How many Kzin does it take to change a lightbulb?" "None. You can scream and leap in the dark."



12