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

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...

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 studying the Monastery: (5)
As of 2016-10-24 23:21 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (311 votes). Check out past polls.