— Switches are ugly as fuck
— But then, what about a different if
syntax that works kind of like a switch...
We have this:
if (thing === x || thing === y)
but what about:
sif(thing, x, y, onX => dostuff, onY => doStuff);
Message permanent page
— sif
is something we can make ourselves but it's eh as well... what if we had a syntax that made it easy:
``sif (thing; x; y;) { ...
Message permanent page
— Idk, something like that
— Where strict comparisons etc are implicit
— Or maybe
sif (thing) is (x) { ... } is (y) { ... }
— I was wondering if it did haha
—
R.ifElse([
[ predicate, callback ],
[ predicate, callback ]
])