▲ | oezi 20 hours ago | |
Certainly possible: add ifTrue as a method to TrueClass and FalseClass. It just isn't very fast. | ||
▲ | codesnik 19 hours ago | parent [-] | |
problem is not with ifTrue, and not with it's performance, it's easy to do. it is "ifTrue:ifFalse:" also it is common to do assignments in the "if", and with actual method and blocks scope of the introduced variable would be different and everyone would be tripping on it all the time. |