in reply to Re: == and != don't work as expected
in thread == and != don't work as expected

Perl is a weakly typed language.
<mini_rant>

No, it's not. It just doesn't associate the type with the name, as you might expect. Try coercing a hash to an array in place or treating a scalar as an array, for example.

C's typing system is only slightly more advanced than bare assembly code.

</mini_rant>

Replies are listed 'Best First'.
Re^3: == and != don't work as expected
by Vautrin (Hermit) on Aug 26, 2004 at 14:14 UTC
    Out of curiousity, can you name some weakly typed languages with your definition?

    Want to support the EFF and FSF by buying cool stuff? Click here.

      Assembly, C, C++ (where it copies C), and Java all have weak type systems, according to this definition.

      Don't mistake a static system which requires knowing type information at compile time with a strong system which, when it has any meaning at all, usually means that you can't (or don't need to) subvert the type system.

      If you have to cast to do your work, you have a weak type system.

        Under your definition it does not sound as if any languages are strongly typed. I have always heard people refer to C, C++, and Java as "strongly typed" languages. Somebody's making a mistake with the definitions here though, and I have trouble accepting a definition of "typing" which does not allow any languages to be strongly typed...

        Want to support the EFF and FSF by buying cool stuff? Click here.