in reply to Re^5: "strong typing" is potentially ambiguous
in thread (Completely OT) - Hero(i)n programming language on Slashdot

Sure, if you want you can subvert the type system in a way that you couldn't with an ML or Haskell, but its much harder to do it accidently.

If you can subvert the system, then it's not strong. It's pretty much impossible to subvert Perl's type system, except using operations that are valid in any programming language (as I demonstrated eariler in the thread). The fact that Perl has a limited number of types is irrelevent to any argument over its strength.

You could say that C/Java/etc. has a more useful type system. However, because of its lack of strength, I don't think Pascal-derived type systems are useful for showing program correctness. They are only good for providing hints to the compiler. Which is really all they were designed for.

I lurk on Lambda, and have read parts of the flame war^H^H^H^H threads you mention. There's a lot of material there to go through.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

  • Comment on Re^6: "strong typing" is potentially ambiguous

Replies are listed 'Best First'.
Re^7: "strong typing" is potentially ambiguous
by sleepingsquirrel (Chaplain) on Dec 15, 2004 at 18:05 UTC
Re^7: "strong typing" is potentially ambiguous
by jdporter (Paladin) on Dec 15, 2004 at 15:22 UTC
    If you can subvert the system, then it's not strong.

    Please go back and read MJD on Strong Typing again. As he says, there is no universally agreed-upon definition of "strong typing". One of the several de facto definitions he cites is the one you're reflecting, above. But there are others. Given that, it would be wise (IMHO) to stop trying to argue whether/how Perl's type system is "strong". Thanks.

    (Update: "more typing goodness from MJD", as sleepingsquirrel put it.)

      There is a good definition of what a type system is. As I noted earilier in the thread, a type system limits the operations you can perform on a given peice of data (this definition is a bit informal, but will do for now). Further, type systems come out of formal logic, and predate CS.

      From that, the definition of "strong type system" comes quite naturally. If you can perform operations that the type system should have forbid, it's a weak type system. Otherwise, it's strong.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        If it's so natural, then why is there so much disagreement? Your definition sounds reasonable... but then, so do most of the other seven MJD cites.

        Unless and until the world agrees on a definition of "strong typing", any discussions revolving around the phrase are destined to devolve into conflagration.