in reply to Re^7: What is best for the future.
in thread What is best for the future.

'if' is a simple, well-understood concept that exists already in the Perl programming language, is well integrated with all other features in the programming language, and is very short. There's not much you can add to an if-statement to enhance its value (at least I haven't seen any experiment that demonstrates added value).
The same can be said for 'for'. Yet 'foreach' exists.

Oh, and for the 'if' case, there's an 'unless' which is just a long way of writing 'if!'.

Replies are listed 'Best First'.
Re^9: What is best for the future.
by moritz (Cardinal) on Aug 26, 2010 at 13:17 UTC
    The same can be said for 'for'

    'for' supports two very different things (the C-style 'for', and iteration over list), so I wouldn't put it in the same category.

    Perl 6 - links to (nearly) everything that is Perl 6.
      'for' supports two very different things (the C-style 'for', and iteration over list), so I wouldn't put it in the same category.
      Yet, 'for' and 'foreach' are actual aliases; both can do the same things.

      But here's another example: tr/// and y///. Or do they provide two different things as well? How about $$foo[0] vs. $foo->[0]?