...spring into existence without even the namespacing protection of different prefixes?
The extremely miniscule benefit of having same-named variables of different types
is one I would gladly trade for the reduction in typing and visual clutter.
Some people code according to style guidelines which explicitly discourage
the use of this feature — and for good reason, imho.
Note that in a name like $x, the keystrokes involved are three times
that necessary to type x. That really belies the alleged priority given to Huffman coding in the design of Perl.
Of course one will argue that good Perl coders don't use names that short;
but a keystroke penalty against them is not a good way to encourage better
behavior. The two keystoke penalty is incurred on every variable name
occurrence.
I think it also worth mentioning that the elimination of sigils would have
major PR benefit as well.
As for springing into existence — this (undeclared variables)
is the sort of behavior that the interpreter should be in the business
of discouraging. The penalty of having to declare a variable is incurred
only once per variable.
A word spoken in Mind will reach its own level, in the objective world, by its own weight
|