12 ms·
True, but also the loop syntax is simply incorrect, which would have been caught by running it; so probably a better interpretation is simply that the author di
by sestep 1y ago
True, but also the loop syntax is simply incorrect, which would have been caught by running it; so probably a better interpretation is simply that the author didn't spend much time thinking about that JavaScript code because it didn't matter for their point.
- masklinn 1y ago> it didn't matter for their point. Which is mostly a lie, since at least half the concepts they gripe about in rust are in the js snippet.
- sestep 1y agoYep fair. I'm not sure why they didn't spend more effort on the JS part, just saying they didn't.
- serial_dev 1y agoBut isn’t it at least part of the problem? The JavaScript code looks completely fine, until the HN comment section finds various subtle bugs that sometimes not even TS can protect you against?
- jynelson 1y agono. the JS program has obvious syntax bugs that TS wouldn't compile. commentors above are right that I was just lazy (ty for the callout, I have since fixed the JS program).