4 ms·
I don't really care about the static/dynamic typing spectrum, I care about the strong/weak typing spectrum. At any point, will the code interpret a data item a
by randomswede 5y ago
I don't really care about the static/dynamic typing spectrum, I care about the strong/weak typing spectrum.
At any point, will the code interpret a data item according to the type it was created with?
A prime example of "weakly typed" is when you can add "12" and 34 to get either "1234" or 46.
- throwaway2037 5y agoThis is an interesting distinction. I confess that I frequently interchange the pairs.
- randomswede 5y agoI mean, to some respect, "dynamic typing" is "type the data" and "static typing" is "type the variable". In both cases, there's the possibility for doing type propagation. But, if you somehow manage to pass in two floats to an addition that a C compiler thinks is an integer addition, you WILL have a bad day. Whereas in Common Lisp, the actual passed-in values are typed (for floats, usually boxed, for integers, if they're fixnums, usually tagged and having a few bits less than you would expect).