Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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 ( [id://610606]=note: print w/replies, xml ) Need Help??


in reply to Re^7: 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"

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

Replies are listed 'Best First'.
Re^9: Interesting read: "Why I use perl and still hate dynamic language weenies too"
by ikegami (Patriarch) on Apr 17, 2007 at 18:40 UTC

    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

        I confused Static vs Dynamic typing with Weak vs Strong typing in my earlier post.

        To answer your question, some elements of Perl are statically typed, and some elements of Perl are dynamically typed.

        The question "Is X strongly typed?" is the invalid one. This post by Dominus includes "eight different and incompatible definitions of 'strongly typed language'" he found.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://610606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-28 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found