4 ms·
This is going to confuse C++ developers where vector::at() explicitly throws exceptions on out of bounds access But I guess the intersect between C++/JS develo
by trinovantes 5y ago
This is going to confuse C++ developers where vector::at() explicitly throws exceptions on out of bounds access
But I guess the intersect between C++/JS developers is too small to care
- yoz-y 5y agoAs one of those c++/js developers I'd just say that I do not map concepts from one language to another because it rarely works anyways.
- IshKebab 5y agoI agree. I would expect it to throw an exception. However I think there is a better way to support that - make `throw` an expression rather than a statement. Then you can do a[10] ?? throw new Error() which currently doesn't work.