开发者

Complexity of Perl? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by开发者_运维问答 facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

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


  • 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜