Wednesday, May 02, 2012

Tricky problems of the Perl language - a completely arbitrary list

  1. Overloading and parameter types validation.
  2. Clash between overloading hashification and arrayification and the each, keys and values with the new dereferencing semantics.
  3. There is no way to know if you received characters or binary data, lots of libraries and even core functions work differently in these cases - but often it is not documented.
  4. In Perl observing a variable changes it - for example - reading a variable containing a string in a number context will fill in its number slot (as far as I understand it - see perlguts for the details). Normally it does not matter - but it makes threading less efficient (because shared variables need to go through additional loops to work).
Two bonus points - using too much of the $ character makes
  1. Perl code ugly
  2. Perl programmers not team players
And one more fixed recently - the one making checking $@ after eval unreliable.

No comments: