Hi all!
Just another, possibly crazy idea: What about implementing #cull:, #cull:cull: etc. on Object?
Object >> #cull: firstArg
^ self value
This could improve the polymorphy between "evaluables" such as blocks or MessageSends and other objects. Example:
[2 / 0] on: ZeroDivide do: Float infinity
Some current implementations that call both #isBlock and #cull: also reveal that there might be a small break in the interface. From #haltIf:
[cid:95ff5c48-deea-4916-916d-937c0382e78b]
Just wanted to share that thought :) In general, do you think blurring the differences between block and object in that way might be a good idea or rather a bad one? At least we already have implemented #value on Object.
Disclaimer: I know that in many cases, you should prefer a block for performance reasons/compiler optimization, but there is still a gap between the interfaces ...
Best,
Christoph