samth
2020-9-10 09:49:49

Any article that talks about “weak typing” is a bad one.


sorawee
2020-9-10 10:02:53

Nailed it. I was like, Sam gotta say something about weak typing lol


sorawee
2020-9-10 10:04:38

Well, at least the article didn’t cite the FSE paper.


wanpeebaw
2020-9-10 10:16:58

Why?


samth
2020-9-10 10:22:05

“weak typing” is not a meaningful concept. Typically it’s used to mean some combination of “primitive operations that are overloaded” and “lack of memory safety”, but the first is perfectly typable (see Typed Racket for a demonstration) and the second is a fundamentally different kind of thing.


gknauth
2020-9-10 11:13:14

Sounds like a need for a weak typing FUD-debunking FAQ entry people can point to,


samth
2020-9-10 11:15:36

plenty of people have written that already


spdegabrielle
2020-9-10 12:52:57

rokitna
2020-9-10 12:57:00

The article (edited to add: the article this thread started with) seems targeted at current and prospective C# programmers, and it describes concepts relevant to the C# language in terms of C# examples. It also uses a couple of JavaScript examples, and it takes care to mention that TypeScript is “backed by Microsoft,” which I suppose is so that C# learners won’t lose interest when they see those parts. I bet it serves its audience’s immediate needs fairly well, even if it doesn’t do much to enrich their understanding of other languages. I’m a little surprised to see it shared here with a Racket audience.

As for weak typing (used in the “overloading” sense), the article isn’t claiming that weak typing isn’t statically typable. It’s already debunking that idea itself: “Despite sounding very similar, “strongly vs. weakly typed” and “statically vs. dynamically typed” are two different concepts.” The first example the weak typing section uses is C#’s own implicit conversion from int to float, and the whole section seems dedicated to rationalizing how C#’s use of implicit conversions, in moderation, can be philosophically compatible with its static typing.


samth
2020-9-10 12:59:43

The problem is that weak typing does not describe a coherent concept


rokitna
2020-9-10 13:32:15

Not everyone has the same idea in mind about what “weak typing” means, but that doesn’t mean the author doesn’t know what concept they’re trying to describe with it. They unpack their terminology a little, describing weak typing as the use of implicit conversions. In general, people might disagree about how to use a term like “implicit conversions” too, but one concept of implicit conversion is described in painstaking detail in the C# standard, and that’s probably the source of coherence this author is most concerned with.


wanpeebaw
2020-9-10 15:40:38

@spdegabrielle Matthias’s article pretty much describes the ideal type system in my mind.


alexknauth
2020-9-10 17:11:38

The article talks about implicit coercions as “weak typing”, but even Coq has coercions and no one would call that weak typing