2008/11/27 Bert Freudenberg bert@freudenbergs.de:
On 27.11.2008, at 15:40, Igor Stasenko wrote:
2008/11/27 Klaus D. Witzel klaus.witzel@cobss.com:
Quick, what does this method return:
MyClass>>myMethod.
and what does this method's block return:
MyClass>>myBlock
^[.]value
I'm writing compiler tests for CorruptVM/Moebius (tests that can then also be used with Squeak's compiler and NewCompiler) and want to include these two cases as well.
mmm.. i think this test case is not qualifying anything. i'd rather test following:
^ [42] value vs ^ [42 . ] value
A period is designating an end of expression , right? For me its more interesting, why in ["empty"] blocks returns nil, but [ 42. "empty" ] block returns 42.
Because the . after the final statement in a block or method is optional.
in squeak, they not just simply optional, you can, as TRUE writer leave an ellipsises [42 ...] value to let readers feel the taste of your novel style :)
- Bert -