Specify semantics of #ifTrue:/#ifFalse: and allow/disallow Smalltalk 80 style optimizations #100
Labels
language design
This issue requires design decisions
spec
Needs specification, or is specification related.
Often Smalltalk implementations would special-case control structures to simplify implementations.
Personally, I think this isn't great. Though, I haven't bothered implementing it correctly either.
It would be good to specify the semantics, or, at the very least, explicitly have an example, and tests to ensure that
#ifTrue:
and similar are treated as pure messages, and any implementation optimization is not observable from the language itself.See smarr/SOMpp#7 for further discussion.
@ltratt's example should work. I don't think there's any good justification for it not to work.
The text was updated successfully, but these errors were encountered: