Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^6: There's Only One Way To Do It

by disciple (Pilgrim)
on Apr 07, 2004 at 03:45 UTC ( [id://343180]=note: print w/replies, xml ) Need Help??


in reply to Re^5: There's Only One Way To Do It
in thread There's Only One Way To Do It

Thanks for the clarification. From your definition, isn't Perl weakly typed in addition to strongly typed? Because in a scalar you can store a string or number (and other things as well). And Perl easily converts between numbers and strings for you.

Replies are listed 'Best First'.
Re: Re^6: There's Only One Way To Do It
by herveus (Prior) on Apr 07, 2004 at 10:59 UTC
    Howdy!

    That depends on what you mean when you say "type". I chose to set the values for "type" as "scalar", "array", and "hash", being the fundamental data types (and ignoring some other, more esoteric, flavors). The number/string distinction is, in my consideration, not a part of the "type"; numbers and strings are each scalars.

    Think of them as an external representation. Some data may not have a meaningful numeric representation, but consider also a hex representation as another flavor. Regardless of the representation, the datum is a single item -- a scalar. It may be an encoding of multiple values that can be teased apart, but that, again, does not make it then a hash or an array.

    yours,
    Michael

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found