Chris
"Chris Uppal" <
[hidden email]> wrote in message
news:
[hidden email]...
> The following method (admittedly a bit odd) has its meaning changed by
> reformat-and-save.
>
> method: aString
>
> ^ aString
> asLowercase;
> size + 2;
> yourself.
>
> which (correctly, at least as compared with D4, and my understanding of
> ANSI) answers the string. Reformat re-writes it to:
>
> method: aString
> ^(aString
> asLowercase;
> size)
> + 2;
> yourself
>
> which answer the length of the string.
Actually I think the parser/formatter are probably correct. When we
originally implemented the Dolphin compiler (well before it was released to
the public) we got the interpretation of cascades completely wrong. When we
realised this we rewrote the parser to support what we thought was the
logically complete and correct way to parse them, but it is more "advanced"
than supported by traditional Smalltalk - VW won't even parse that method.
It may be that the ANSI spec. agrees with they way Dolphin parses cascades,
but I don't think that was deliberate (i.e. I expect the intent was to
standardise the behaviour of the major implementations at that time). I
didn't join the ANSI committee until very late on, and so wasn't involved
with discussions over syntax.
Regards
Blair