Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: strong typing

by jdporter (Canon)
on Dec 15, 2004 at 15:17 UTC ( #415061=note: print w/replies, xml ) Need Help??


in reply to Re^3: strong typing
in thread (Completely OT) - Hero(i)n programming language on Slashdot

Perl's type system has no concept of "integer", "boolean", etc.--it only knows about scalars...
But that isn't entirely true:
print 5 == "foo"; Argument "foo" isn't numeric in numeric eq (==)

The fact that these types are checked/enforced at run time rather than compile time doesn't mean they aren't types. It's called dynamic typing.

Replies are listed 'Best First'.
Re^5: strong typing
by chromatic (Archbishop) on Dec 16, 2004 at 00:14 UTC

    Those aren't types in Perl. Those are values.

      Huh? You're saying numeric is a value? No. It's a type. Values have types. It's the type of "foo" that perl is complaining about, not its value.

        Containers have types in Perl. Values don't. That's how (I say) Perl's type system works.

        (Okay, that's not entirely true, but if you need gory details, look in sv.h and Devel::Peek. My point is that Perl doesn't expose the types of values to users.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-11-30 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?