[squeak-dev] $- in binary selectors

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Feb 25 01:00:29 UTC 2010


2010/2/25 Eliot Miranda <eliot.miranda at gmail.com>:
>
>
> On Wed, Feb 24, 2010 at 4:20 PM, Nicolas Cellier
> <nicolas.cellier.aka.nice at gmail.com> wrote:
>>
>> Lukas suggested to not provide backward compatibility and compile 1 at -2
>> as 1 @- (2)
>> That's what Igor expect, and that's what VW did.
>> In my image this would mean changing:
>>
>> AlignmentMorph>>#addUpDownArrowsFor:
>> BalloonCanvas>>#makeRoundRectShape:radius:
>> Cursor class>>#initBottomRight
>> Cursor class>>#initResizeLeft
>> Cursor class>>#initNormalWithMask
>> Cursor class>>#initResizeTopLeft
>> Cursor class>>#initCorner
>> Cursor class>>#initCrossHair
>> Cursor class>>#initSquare
>> Cursor class>>#initResizeTop
>> Cursor class>>#initResizeTopRight
>> Cursor class>>#initBottomLeft
>> FlapTab>>#fitContents
>> FontChooserMorph>>#createWindow
>> Form>>#findShapeAroundSeedBlock:
>> Form>>#pageImage:at:corner:
>> Form class>>#xorHack:
>> Form class>>#toothpaste:
>> FractionTest>>#testFractionPrinting
>> GraphicSymbolInstance class>>#example
>> MethodFinder>>#testRandom
>> MethodFinder>>#testFromTuple:
>> Morph>>#changeColorTarget:selector:originalColor:hand:
>> PNGReadWriterTest>>#drawTransparentStuffOn:
>> PNGReadWriterTest>>#drawStuffOn:
>> PaintBoxMorph>>#init4
>> PaintBoxMorph>>#fixUpColorPicker
>> PianoKeyboardMorph>>#buildKeyboard
>> Point>>#fourNeighbors
>> Point>>#eightNeighbors
>> PointTest>>#testBearingToPoint
>> PointTest>>#testTheta
>> PolygonMorph>>#nudgeForLabel:
>> PostscriptDummyWarp>>#subCanvas:
>> PreDebugWindow>>#adjustBookControls
>> ScriptEditorMorph>>#createThreadShowing
>> ScriptEditorMorph>>#extent:
>> ScrollPane>>#vResizeScrollBar
>> StandardSystemController>>#cursorOnBorder
>> StandardSystemView>>#closeBoxFrame
>> StandardSystemView>>#growBoxFrame
>> SyntaxMorph>>#selectorMenuAsk:
>> SyntaxMorph>>#drawOn:
>> SyntaxMorph class>>#standardInset
>> TTSampleFontMorph>>#drawCharactersOn:
>> TTSampleStringMorph>>#computeTransform
>> ViewerLine>>#addGetterFeedback
>>
>> This would also mean breaking some packages.
>> One known workaround is to implement @- (main cause of error)
>
> This should be done anyway.  But IMO @- should be implemented to raise an
> error /not/ sign-invert!  We want people to clean up, not rely on a crutch.
> BTW, I've long thought that period should be followed by white-space or the
> end of a method to be legal as a statement terminator.  e.g. 1.1 is a float
> with value ~= 1 + (1/10).  It is not the statement 1 followed by the
> statement 1.  Further, whitespace should be required after a literal number
> and before a keyword.  With VisualWorks I got bitten badly by something like
> the following
>    first: 1second: expr
> which had at one time worked but when I recompiled the system caused an
> infinite recursion due to first:econd: not being understood because in the
> mean-time the compiler had been changed to accept digits 's' as representing
> a fixed-point number.
> I've not thought through this in any systematic manner but if there's anyone
> else who agrees that ambiguity is to be avoided and that this is worth
> thinking about then I'd happily discuss it further.
> best
> Eliot

Ouch, I was just thinking of authorizing 1s which seems to be ANSI...

Nicolas

>>
>> Nicolas
>>
>
>
>
>
>



More information about the Squeak-dev mailing list