3 ms·
I seem to be inside your parent's "most people" and you seem to be outside of it. I have no idea if the word "most" is appropriate, but at least "some" is. The
by sanderjd 12y ago
I seem to be inside your parent's "most people" and you seem to be outside of it. I have no idea if the word "most" is appropriate, but at least "some" is.
The sense in which that post intended "weakly typed" is the one in which it means that types are checked neither at compile-time (statically) or at runtime (dynamically). For instance, (most?) assembly is "weakly" typed, because I can "pass" whatever data I want into a subroutine without it noticing whether or not that data has the correct type. On the other hand, Ruby is "strongly" typed, because I get "NoMethodError" if I try to call a method on a type that doesn't implement that method. And Rust is also "strongly" typed because I get an error from the compiler if I try to call a method on a type that doesn't implement that method. But Ruby is "dynamically" typed because I get that "NoMethodError" at runtime, while Rust is "statically" typed because I get that compiler error at compile-time.
I guess you know all this stuff, but you seem to think the terminology is less common than I do!
- jholman 12y agoYeah. And all three of us are outside of my "most programmers", which is unsurprising, because we are reading comments on a post about type systems, which is a weird thing to do. I encourage you to go ask some random C++ programmers, perhaps a bunch of EA employees, whether C or PHP is more "strongly typed", and see what they say. Note that because of void pointers, I believe that C fits your definition of "weakly typed", and as far as I know, PHP does not fit your definition (and btw I agree with you about what steveklabnik intended, though we may both be wrong). And yeah, we're primarily disagreeing about what classes of people agree on what terminology. This is why I agree with chrisseaton in the cousin-thread, that there is no good definition... people assume other people know what "strong" means, and yet they mostly disagree. And I'd like to repeat that as far as I can tell, if you survey the type-theorist literature, I think that type theorists a) have mostly stopped using those stupid vague labels, and b) back when they did use them, each author used them for something different and repeat my entreaty for evidence to the contrary.
- sanderjd 12y agoI agree with everything you said except that I think there are good definitions, even if they are not widely agreed upon. That is to say, I believe the definitions I laid out are good in the sense that they are consistent and provide a good framework in which to view things. That doesn't mean I think they're rigorous. I would be very interested to hear the results of your survey of C++ programmers (or one of programmers more widely). I have no idea what the results would be.