in reply to Re: Re: Re: Re: There's Only One Way To Do It
in thread There's Only One Way To Do It
Not quite. Realize that the definitions of "strong" and "static" typing are orthogonal, and I wish there was a completely different terminology used, since they are so easily confused. "Strong" means you can't convert between the types easily. "Static" means the compiler has some idea of what the type is. "Weak" is the opposite of "strong", and "dynamic" is the opposite of "static".
Since you can't convert an array into a scalar, this aspect of Perl is strongly typed. Since a scalar can hold pretty much anything (strings, numbers, references, etc.), this aspect is dynamically typed.
Static typing, IMHO, is extremely overrated. Since many statically typed languages make it easy to cast one type into another, you can't trust it to be anything more than an optimization hint.
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: There's Only One Way To Do It
by disciple (Pilgrim) on Apr 07, 2004 at 03:45 UTC | |
by herveus (Prior) on Apr 07, 2004 at 10:59 UTC |