NewCompiler weird ANSI

stephane ducasse stephane.ducasse at free.fr
Thu May 24 12:02:21 UTC 2007


nicolas

thanks, please notice that marcus is not reading the squeak-dev  
mailinglist anymore.
Please cross post to the new compiler mailing-list

Stef

On 24 mai 07, at 00:12, nicolas cellier wrote:

>
> As stated in NewCompiler's code, the ANSI syntax:
>
> ClosureCompiler evaluate: '- 1'
>
> is WEIRD!
> It answers -1 as a literal negative number, space not being  
> significant. BEWARE a tab or cr are significant in current  
> implementation (ANSI?)
>
> This is more confusing than usefull.
> It makes people think of a prefixed operator like other languages.
> Also, as already said, inside literal array #(- 1) space is  
> significant.
>
> And what about the sign of exponent?
> ClosureCompiler evaluate: '-1.0e- 1'. Message not understood e
> ((-1.0) e) - (1), so space is significant here.
>
> Beside, as NewCompiler accepts minus as last character of a multi- 
> character binary selector, this causes further ambiguity.
>
> ClosureCompiler evaluate: '0--1'. is 1 (0-(-1)) last minus is  
> attached to digit because there is no space.
> ClosureCompiler evaluate: '0-- 1'. Message not understood --
> 2 contradictory rules
> - either space is significant thus selector is #--
> - or space is not significant (like '- 1')
> The first rule wins apparently
>
> Weak weak ANSI. What was in their mind?
>
> Nicolas
>
>
>




More information about the Squeak-dev mailing list