4 ms·
> Most people work with a two-axes "strong" vs "weak" and "dynamic" vs "static" system. I dispute this. First of all, I think that most programmers use a one-
by jholman 12y ago
> Most people work with a two-axes "strong" vs "weak" and "dynamic" vs "static" system.
I dispute this.
First of all, I think that most programmers use a one-axis system of strong/weak, where "strong" means approximately "the safety that I like", and "weak" means approximately "lacking the safety that I like", a system in which they have no words for "additional safety that I do not value". I'm not aware of any useful definition of these words, nor any specific definition widely agreed upon by any meaningful non-partisan class of speakers (e.g. "working programmers" or "published academic type theorists"). Can you correct me?
As such, I think that saying "very, very few languages are 'weakly' typed" is unlikely to be understood by your audience in the sense that you intended it (whatever sense that was).
I agree that the dynamic/static axis seems to be in wide use, and I'm unaware of massive divergences in usage. Although note that many people spell the word "static" using the letters ['s', 't', 'r', 'o', 'n', 'g'].
- sanderjd 12y agoI 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.
- imanaccount247 12y ago>nor any specific definition widely agreed upon by any meaningful non-partisan class of speakers (e.g. "working programmers" or "published academic type theorists" How are "academic type theorists" partisan exactly? That sounds a lot like saying "I haven't seen a definition of medicine that is widely agreed upon by both biologists and homeopaths". Of course not, but those are not equal opposite sides. One side is correct, and the other is not.
- jholman 12y ago"Working programmers" and "published academic type theorists" are examples of meaningful-to-me hopefully-non-partisan classes of speakers. I can't manage to parse what I wrote any other way, I don't know what you read. In this context, advocates of a particular programming language, or particular paradigm, are what I had in mind by "partisan", in that I believe them to be likely to have relatively-agreed-upon definitions of "strong" (within their language community), and I also believe those definitions to be amusingly self-congratulatory. Also, btw, while I think that homeopathy as a "medical discipline" is contemptible, it's pretty stupid to say "biologists are correct about the meaning of this word, and homeopaths are not". The way that words work is that they mean what people use them to mean. This, in fact, is my point about the phrases "strong typing" and "weak typing"; in my experience and my literature surveys, these phrases are NOT used consistently, and thus i.m.o. if you wish for your audience to hear the thing you intend to mean, you're better off avoiding those phrases.
- imanaccount247 12y ago>I can't manage to parse what I wrote any other way, I don't know what you read. I misread it as examples of partisans groups, with the implication that they were opposite sides of a coin. My bad.
- tome 12y agoAs a supposed Haskell advocate you are really doing a very good job of being thoroughly unpleasant. Knock it off. It reflects very badly on the Haskell community.
- deleted 12y ago[deleted]