Ahh, we weren't aware of that. We have to check the code-base.
The rewrite was ment to make the code work in Squeak 3.9 and earlier.
Lukas
On 16 June 2010 23:31, Dale Henrichs <dhenrich(a)vmware.com> wrote:
Lukas,
Unless I misunderstand the rewrite rules, doesn't the following rule end up
as a noop (ifNotNil: isn't really converted):
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]'
with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ]';
and worse yet the `ifNotNil: [:arg|]` form isn't supported by GemStone...
Dale
Lukas Renggli wrote:
I don't see any senders in my image.
Actually #ifNotNil: is accepted by Slime, the rewrite rules we follow are
these:
self rewriteRule
replace: '``@boolean ifNotNilDo: ``@block'
with: '``@boolean ifNotNil: ``@block';
replace: '``@boolean ifNotNilDo: ``@block1 ifNil:
``@block2'
with: '``@boolean ifNotNil: ``@block1 ifNil:
``@block2';
replace: '``@boolean ifNil: ``@block1 ifNotNilDo:
``@block2'
with: '``@boolean ifNil: ``@block1 ifNotNil:
``@block2';
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]'
with: '``@boolean ifNotNil: [ :arg | | `@temps |
``@.body ]';
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]
ifNil: ``@block '
with: '``@boolean ifNotNil: [ :arg | | `@temps |
``@.body ] ifNil: ``@block';
replace: '``@boolean ifNil: ``@block ifNotNil: [ | `@temps
| ``@.body ]'
with: '``@boolean ifNil: ``@block ifNotNil: [ :arg
| | `@temps | ``@.body ]'
Personally I only use #ifNil: for lazy accessors, otherwise I don't
like these constructs.
Lukas
On 16 June 2010 21:37, Dale Henrichs <dhenrich(a)vmware.com> wrote:
I'm porting to Pier2 to GemStone and ran into several places where
#ifNotNil: is being used ... what is the accepted replacement for
#ifNotNil:
... I can clean these up as part of my port.
Dale
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki