3 ms·
> I seriously can't think of an example of this. If all testing is done properly, from unit testing to integration, Those tests take time to write, time to mai
by seanwilson 8y ago
> I seriously can't think of an example of this. If all testing is done properly, from unit testing to integration,
Those tests take time to write, time to maintain and must be updated when you refactor. They're not free. It's very unlikely you're writing tests to cover every case of e.g. a variable being undefined or the wrong type either which happen often.
> In the second example, gone are the years of making Javascript an elegant and straightforward language, adorned by the intuitive syntactic sugar that is JSX.
You'd be better looking at examples that mix strings, numbers, arrays and potentially undefined variables.
For the small amount of time annotations would take to write you're getting all the benefits I mentioned. Those benefits are worth a huge amount on projects with lots of code and team members. I wouldn't say JavaScript is elegant and straightforward when simple looking code can be full of subtle bugs.