Hacker News new | past | comments | ask | show | jobs | submit login

Moose is one of those things I always mention when people ask what Perl did right.

It wouldn't hurt other languages to have a higher order object templating system.

Other things it did right is the taint flag to keep user supplied data from hitting sensitive functions by way of the type system. (In Rust you can declare your own type to achieve this, and it's actually enforced.)

The unicode system was actually decent in ways nothing else is, at least until the Go and Rust generation. Python 3 wasn't nearly as complete despite being more than a decade later.

If people ask what Perl did wrong, the dereferencing syntax is at the top of my list. Not having multidimensional arrays as a first class type probably did more to scare people away than anything else.




After the first deref, deref is assumed. Given:

  my $aref = [1,2,[3,4,5,[6,7] ] ];
You can do

  print $aref->[2][3][1];
which yields:

  7
Or

  my @array = (1,2,[3,4,5,[6,7] ] );
  print $array[2][3][1];
  7




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: