Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>The easy way to tell types apart in ordinary JS is to have consistent naming conventions....you can infer the type from the name correctly 90% of the time.

is any process with a 10% margin of error really an easy one?



When you're operating in a non typed language, you don't have a choice. That's the best option.

Of course you could literally spell out the type. But verbosity not worth it. Also no guarantee the name was written correctly.

But I've found most JS codebases don't have rigorous standards around naming to begin with, so even doing that is a big win




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: