News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by gpderetta on Wednesday October 04, 2023 @11:10AM (#37766315)
You can't change the type of an object in C++ so I'm not sure how your definition applies.

Generally "strong" vs "weak" typing[1] is an ill-defined an mostly useless definition.

[1] as opposed to static vs dynamic or safe vs unsafe.

Re:Strong typing, a hill I'm willing to die on by syndicatedjelly on Wednesday October 04, 2023 @11:46AM (#37766881)
Re:Strong typing, a hill I'm willing to die on by gpderetta on Wednesday October 04, 2023 @12:01PM (#37767137)
Casts don't change the type of an object. They might create a new object of another type from the first one.

edit: I guess what you want to say is that implicit casts make a type system weak. But even there there is plenty of wiggle room: I think that everybody agree that implicitly converting the string "1" to an integer is bad (which is not allowed in C++). Narrowing conversions are arguably bad (they are sometimes allowed in C++), but some other implicit conversions are hard to argue against (int to long for example, or derived to base).