Hacker News new | ask | show | jobs
by c0nfused 2983 days ago
I would argue that it doesn't feel like JavaScript much which seems bad.
2 comments

Why? To me it seems pretty aligned with the "feel" of destructuring.
In my mind there are several valid options out there now:

1. Regex style: new match(input, options);

or built in function match(foo, bar);

or like switch match (foo){ cases

}

But, to have the switch statement syntax and return a value seems like a less than good way to implement this.

I'd argue they've already started going down the "doesn't feel much like JavaScript" road when they started introducing things like fat arrows. I agree that it is bad.
Along with the class syntax (however convenient, JS is not a class-based language).

Aren't decorators also in the works?