4 ms·
No special cases; apart from the special cases ;-) Some Smalltalk methods are "compiled in-line" special — ifTrue: alternativeBlock "If the receiver is
by igouy 5y ago
No special cases; apart from the special cases ;-)
Some Smalltalk methods are "compiled in-line" special —
ifTrue: alternativeBlock
"If the receiver is false (i.e., the condition is false), then the value is the
false alternative, which is nil. Otherwise answer the result of evaluating
the argument, alternativeBlock. Create an error notification if the
receiver is nonBoolean. Execution does not actually reach here because
the expression is compiled in-line."
self subclassResponsibility
- matheusmoreira 5y agoThat's just the implementation though, isn't it? In the language proper, the method still exists. The implementation just compiles it away.
- igouy 5y agoHow would — "Of course they can be overridden..." — work when the method is: ifTrue: