[Newcompiler] Fwd: NewCompiler weird ANSI

Mathieu Suen mathk.sue at gmail.com
Thu May 24 09:11:08 UTC 2007


	Mth



Begin forwarded message:

> From: nicolas cellier <ncellier at ifrance.com>
> Date: May 24, 2007 12:12:27 AM CEDT
> To: squeak-dev at lists.squeakfoundation.org
> Subject: NewCompiler weird ANSI
> Reply-To: The general-purpose Squeak developers list <squeak- 
> dev at lists.squeakfoundation.org>
>
>
> 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 Newcompiler mailing list