[squeak-dev] Re: non braking space oddity

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Oct 27 11:01:49 UTC 2009


2009/10/27 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> Hem, definition: a braking space with good enough brakes prevent a line break.
>
> I would prefer a default fill of TypeTable with #xInvalidCharacter
> wouldn't you ?
>

Oh, I just noticed there is a #xIllegal ... Not really used.

Using #xIllegal as default type would raise the question of what
character beyond ASCII can be considered a valid binary...

«¬­±·»¿×÷ eventually are good candidates for example
Not sure about these ¢£¤¥§¶

My following question will be about
Scanner>>typeTableAt: aCharacter
	^typeTable at: aCharacter charCode ifAbsent:[#xLetter]

I would tend to restrict this to
	^typeTable at: aCharacter charCode ifAbsent:[
		aCharacter isLetter
			ifTrue: [#xLetter]
			ifFalse: [#xIllegal]]

but we might want some more extended binary characters...
And program with ideograms, not only letters...

Unless we restrict selectors to ASCII ?
Are non ASCII selectors in use ?

> Nicolas
>
> 2009/10/27 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
>> While looking at http://bugs.squeak.org/view.php?id=7211, I found this
>> funny classification:
>>
>> Character nbsp isSeparator. -> false
>> (Scanner new typeTableAt: Character nbsp) -> #xBinary
>>
>> That makes nbsp a valid binary selector, and that ain't good...
>>
>> Example: I thought I would compile a method #bingo, but I compile a
>> method with an invisible binary selector...
>>
>> Object compile: (String with: Character nbsp) , ' bingo ^self'.
>> 2 perform: (String with: Character nbsp) asSymbol with: nil.
>> 2 perform: #bingo.
>>
>> Note that a leading nbsp can happen via a copy from web...
>> I doubt this is an intentional feature.
>>
>



More information about the Squeak-dev mailing list