doIfNotNil: -- let's bake the other half

Bob Arning arning at charm.net
Sat Oct 21 02:09:08 UTC 2000


On Fri, 20 Oct 2000 19:36:36 -0400 Doug Way <dway at riskmetrics.com> wrote:
>Playing devil's advocate, would it be so horrible to just re-use ifNotNil:, but allow zero or one arguments in the block?  IMO, it would be perfectly clear what was happening in the code, whether or not the block had an argument.  I guess you would need to have a check inside ifNotNil: to see whether the block contained an argument, though.  (Would there be implementation problems with this?)

Doug,

This is the proposal I would support. I could all be handled by the implementation of #value, #value: and their siblings. Some might cry that this would hide errors, but I would be happy to live with it.

Cheers,
Bob





More information about the Squeak-dev mailing list