in reply to Re^5: What's wrong with Perl 6?
in thread What's wrong with Perl 6?

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.

How much is the benefit of being able to look at a piece of code and identify which elements are variables and, of those, which are aggregates and which are scalars and which support which types of indexing operations? People will invent their own Hungarian notations without scalars, I promise you.

(undeclared variables) is the sort of behavior that the interpreter should be in the business of discouraging.

Somehow Ruby and Python don't manage that feature. It's awfully difficult if you allow lvalue functions and features such as method_missing.

Replies are listed 'Best First'.
Re^7: What's wrong with Perl 6?
by kyle (Abbot) on May 14, 2007 at 15:29 UTC

    Being able to see the variables is good, but the other benefits you mention sort of went out the window with references. Some $foo might be a simple scalar, as the sigil implies, but it might also be the gatekeeper to a huge complex data structure, which may or may not be an object. We have ref and Scalar::Util::blessed to help figure that out at run time (thank goodness), but those don't help at comprehension time. It's hard to look at any code that's heavy in objects and get a sense of what some $foo really is if it doesn't have a good name.