5 ms·
Those you mention no. There are tools for typechecking (flow) and to be honest in years of JS programming only rarely have I had bugs caused by a variable of th
by gotofritz 10y ago
Those you mention no. There are tools for typechecking (flow) and to be honest in years of JS programming only rarely have I had bugs caused by a variable of the wrong type being passed into a function. As for the "weird" equality operator, again, not an issue, any linter will force you to use === and then you are good to go.
If you are talking about the callback queue getting too full and causing delays you may have a point, but the objections that you have raised are quite petty.
- vesak 10y ago>Those you mention no. There are tools for typechecking (flow) and to be honest in years of JS programming only rarely have I had bugs caused by a variable of the wrong type being passed into a function. Are you certain that that is true, or do you think it might just be that you're so used to the dynamic woes that you nearly ignore them?
- gotofritz 10y agoI don't experience any "dynamic woes". I am used to checking for whatever input is coming into my functions.
- Someone 10y agoWriting code that type-checks whatever input is coming into your functions may only take time, but what really are woes that you will have fewer of the stronger the type system, is that you have to design the code that runs when those checks fail. That designing requires thinking, and thinking takes your attention away from whatever your goals are, whether you are used to it or not. Strong type systems come with their own things that require extra thinking, but I think it is less than what is required to write robust dynamically typed code. Many projects don't need truly robust code. Then, the dynamic language may still win.
- gotofritz 10y ago> Strong type systems come with their own things that require extra thinking, but I think it is less than ... Well, that's your bias. As I said in practice I don't see a problem. And also, as I said, there are static analysers, and you really HAVE to have strong type you can always use typescript.
- vesak 10y agoPerhaps I'm doing a strawman here, sorry in advance. But you seem to imply that you implement strong type checking into all(?) your functions yourself and think that is a better solution than having your platform do it for you automatically and systematically. Or is it about the freedom of not doing it?
- gotofritz 10y agoI check when needed, and I think it's better than having to compile code, yes.