3 ms·
I don't agree with his overall thought process, but JavaScript is not without issues. I believe what he's referring to here is that JS will (usually) determin
by nebulous1 7y ago
I don't agree with his overall thought process, but JavaScript is not without issues. I believe what he's referring to here is that JS will (usually) determine its actions based on its runtime type whereas C will (usually) determine its action based on the compile time type. So if I am expecting a number but get passed a string, in JS I am now executing string operations (with all operators) whereas in C I'm going to be doing arithmetic as expected but on incorrect data (probably the address of the string). Both of these are likely not be what we want, but the JS can end up with extremely unexpected outcomes, especially if we end up with object mismatches, where as the C is restricted to outcomes for different numeric inputs.