News for hackers. Stuff that matters.
Re:Migrating a 10,000-line legacy JavaScript codebase to Typ... by z3t4 on Friday June 17, 2016 @02:56AM (#11921068)
I'm working on a real time (as you type) JS static analyzer witch will hopefully detect these errors. So I'm interested in what sort of bugs is common.

I believe that types don't belong in a high level programming language like JS, where the JS engine decides the best type to use and optimize things like string concatenation. A good static analyzer and tests should cover most of the advantages of a strictly typed compiled language.

Re:Migrating a 10,000-line legacy JavaScript codebase to Typ... by Nullabillity on Friday June 17, 2016 @06:26AM (#11921760)
Don't confuse types with the implementation. Regardless of how the string concatenation works, you'll still need to make sure that you get something that sort of looks and behaves like a string. That's where the static typing comes in.
Re:Migrating a 10,000-line legacy JavaScript codebase to Typ... by spraak on Friday June 17, 2016 @02:10PM (#11924399)
Can you a share a link to your project? It seems really useful to me
Re:Migrating a 10,000-line legacy JavaScript codebase to Typ... by z3t4 on Friday June 17, 2016 @03:32PM (#11925024)
It's in an early stage and doesn't do much ATM that can't be accomplished with something like "Tern". If you drop your e-mail in your profile, I'll send you a link when I got something to show.