Message from JavaScript discussions

November 2017

— I feel like there is a missing switch syntax


In JS and other langs it's a huge single block of statements seperated by break which grosses me out

— 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) { ... }

— Ramda has this, kindof

— I was wondering if it did haha


[ predicate, callback ],
[ predicate, callback ]

— Something like that