in reply to Re^6: Interesting read: "Why I use perl and still hate dynamic language weenies too"
in thread Interesting read: "Why I use perl and still hate dynamic language weenies too"

There is only one type, the tagged scalar.

Your programs are about to get a lot more useful; Perl supports arrays and hashes too!

  • Comment on Re^7: Interesting read: "Why I use perl and still hate dynamic language weenies too"

Replies are listed 'Best First'.
Re^8: Interesting read: "Why I use perl and still hate dynamic language weenies too"
by dewey (Pilgrim) on Apr 17, 2007 at 18:10 UTC
    What?? My life just got so much easier! ;)

    But seriously, if I'm confused about this maybe you can clear it up. Is Perl statically typed, dynamically typed, or some crazy other thing that I don't know about?

    Perl does "support arrays and hashes", but I was always under the impression that this was a run-time check on tagged values (dynamic) rather than a compile-time check on untagged values (static). Are we saying that Perl is statically typed, where the types are scalar, hash, and array? If it's truly dynamically typed, how can these distinctions arise?

    Thanks for your help.

    ~dewey

      SV (scalar), AV (array), HV (hash), GV (glob), etc are different, independent structures. Different opcodes are used to interact with them. For example, padsv is used to fetch an SV lexical, while padav is used to fetch an AV lexical.

      SVs can be IV (signed int), UV (unsigned int), NV (decimal number), PV (string), RV (reference), etc. It can even be certain combinations of those. What you said in your earlier post does apply to scalars.

        So Perl is statically typed?

        ~dewey