in reply to Re^5: what would you like to see in perl5.12?
in thread what would you like to see in perl5.12?

The fact that there is a bad example doesn't mean it can't be done right. Take a look at Eiffel for an example of simple, readable type declarations.
  • Comment on Re^6: what would you like to see in perl5.12?

Replies are listed 'Best First'.
Re^7: what would you like to see in perl5.12?
by BrowserUk (Patriarch) on Aug 20, 2007 at 21:12 UTC
Re^7: what would you like to see in perl5.12?
by Jenda (Abbot) on Aug 20, 2007 at 23:11 UTC
    file_status (filedesc: INTEGER): INTEGER is ...
    ... looks to me like the types are written after the typed variables/parameters. Hence ... looks like it's not using prefix types. All I'm trying to say is that we should look at C and NOT repeat it's seemingly bright ideat to put the type before the variable ending up putting the type information all around the variable.

      In Perl 6 you can put the type either before or after, taking end-weight into account. So
      my Int @array;
      is equivalent to
      my @array of Int;
      which in turn is really short for
      my @array is Array of Int;
      so it's easy to see how you can end up with cool things like
      my @array of Hash of Tree of Int;