3 ms·
> Except that now you're no longer talking about something that requires the fuzzy handwaving of 'strong' vs. 'weak', which lack the well-defined one-way transf
by derefr 16y ago
> Except that now you're no longer talking about something that requires the fuzzy handwaving of 'strong' vs. 'weak', which lack the well-defined one-way transformational characteristics of which you speak :)
You missed a (perhaps subtle) point: the thing that has "well-defined one-way transformational characteristics" is an operation (an algorithm), not a type-system. A type-system can be thought of as a set of operations, a digraph specifying all the ways to go from each type to each other type in your system. This set has the property of being strong by default—but becomes weak if any of the operations is non-surjective. This is separate from a sound system, which is one that does not permit non-surjective operations.
For an example of the crucial difference: I can program in "a strong subset of C" (C with all the non-surjective functions/casts removed.) I cannot program in "a sound subset of C." There is no such thing.
- blasdel 16y agoThere is still an even more subtle point that you are absurdly close to understanding, and that the article touches on a bit — there really is no such thing as a type system, only a set of times and places where types are(n't) checked — operations. You even say so yourself! You'll find programming language theorists using the phrase "a sound subset" with no qualms.
- deleted 16y ago[deleted]
- derefr 16y agoSaying that there is no such thing as a type system is like saying there is no such thing as an integer. Sure, your machine can only represent an integer (and not very well), but that doesn't mean they don't exist—they're simply mathematical constructs. Mathematical constructs can have properties, such as being prime or composite, real or transfinite, countable or uncountable, or, in this case, strong or weak. > You'll find programming language theorists using the phrase "a sound subset" with no qualms. It makes no sense, though. There is no sound subset of C, because C isn't checked anywhere. There is no amount of pruning you could do that would allow you to call the result "sound": only by adding checks could you assert that. The usefulness of the term "strong" is that a strong system (pure surjective digraph) is able to be made sound, while a weak system (impure digraph) is not.