On 10.11.2008, at 15:56, Marcus Denker wrote:
On 10.11.2008, at 15:42, Igor Stasenko wrote:
2008/11/10 Marcus Denker <denker@iam.unibe.ch>:
- ifNotNilDo: calls renamed to ifNotNil:
does it means that #ifNotNil: now accepts monadic blocks? If yes, then cool :)
Yes. And it optimizes them even, same like ifNotNil: without an argument.
This was done by Vassili Bykov http://blog.3plus4.org/2007/04/22/notnil-then-what/ The only problem remaining is that the decompiler does not decompile it correctly... Smalltalk ifNotNil: [:each | 1 + 4] is decompiles to: tt | each | (each := Smalltalk) ifNotNil: [1 + 4] So the decompiler needs to be enhanced to be a bit cleverer. (I will add a bug-report for that). Marcus -- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker