views:

46

answers:

2

What is the general discussion of the complexity of the Perl programming language, like what should one really focus on when discussing its complexity?

A: 

One source perl's "complexity" comes from there being several ways to do something.

Consider the lowly "if" statement. Perl offers several alternative if, and if-like constructs. N00b perl programmers are forced to ask which is "preferred" and find that the answer is often nuanced.

Sometimes it's do_something || die, sometimes it's do_something or die, sometimes it's a for-real if-statement.

S.Lott
+2  A: 
  • Many ways to accomplish the same thing, some of which are poorly structured due to its heritage as a scripting language
  • The way that variable references seem to change the type of the variable when you change the leading character, e.g. from @ to $
  • The function calling and result returning mechanism
  • It is difficult to read PERL. Even the writer of a PERL program will experience difficulty in returning to their own code and making sense of it
  • Regular Expressions are too easy to use and often used where a parser or just plain string functions would be clearer and more efficient
  • Due to a flood of PERL programming books in the early days of the web, many of which are poorly written, a lot of people learned PERL in a very unstructured way. This makes it harder to manage a team of people writing professional grade code in a consistent way
Michael Dillon