←back to thread

517 points bkolobara | 1 comments | | HN request time: 0.524s | source
Show context
merdaverse ◴[] No.45043051[source]
Code written below your line gets executed if you don't return early. More breaking news at 8.

Seriously, why would you think that assigning a value would stop your script from executing? Maybe the Typescript example is missing some context, but it seems like such a weird case to present as a "data race".

replies(8): >>45043245 #>>45043339 #>>45043398 #>>45043537 #>>45043876 #>>45046033 #>>45046975 #>>45049155 #
1. IshKebab ◴[] No.45046033[source]
Whenever someone talks about a surprising paper cut like this you always see misguided "this is obvious" comments.

No shit. It's obvious because you literally just read a blog post explaining it. The point is if you sprinkle dozens of "obvious" things through a large enough code based, one of them is going to bite you sooner or later.

It's better if the language helps you avoid them.