Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re (tilly) 6: Exegesis 2 - Perl 6

by tilly (Archbishop)
on May 16, 2001 at 20:27 UTC ( #80944=note: print w/ replies, xml ) Need Help??

in reply to Re: Re (tilly) 4: Exegesis 2 - Perl 6
in thread Exegesis 2 - Perl 6

It has to do with type systems.

Perl's typing strategy has always been to type its core operations but not its variables. Then it will cast its variables as implied by its operations. The alternative that most other languages use is to type their variables but not their core operations.

What this means is that in Perl you very rarely even have to think about the fact that "33" is different from 33. The following two are the same:

$x = 33 + 55; # -> 88 $x = "33" + "55"; # -> 88, in other languages "3355".
I think that, whether or not you think that Perl's type system is the best design, changing whether you have to think about the difference between strings and numbers would make Perl no longer Perl...

Comment on Re (tilly) 6: Exegesis 2 - Perl 6
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-11-27 11:26 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (725 votes), past polls