|
|
|
|
|
by lmm
4882 days ago
|
|
Makes me think of the smalltalk approach to branching, where it's there, but just another method call (on a boolean) - rather than if(a > b) {...code...}
you do something like (a > b).ifTrue({...code...})
I think it's an approach more languages should use - it means there are fewer special cases in the syntax, and you can compose conditionals or use them in higher-order functions more easily. |
|