Penguin

Differences between version 20 and predecessor to the previous major change of WhyIHatePerl.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 20 Last edited on Wednesday, August 31, 2005 11:13:44 am by JaredUpdike Revert
Older page: version 18 Last edited on Thursday, August 25, 2005 12:32:33 am by AristotlePagaltzis Revert
@@ -27,8 +27,10 @@
  
 To effectively work on a large project you've got to manage complexity, with perl unless you are very strict, the complexity gets away from you. The thing is most programs start 'small' (I'll just write something that parses subscribe/unsubscribe requests and updates a sendmail alias) but ends up growing over time into a monster (majordomo...) Compared to almost any other language, Perl makes you spend a lot of time working with the irrelevant. 
  
 ''Perl let's you know about the reference as well as the reference. Other languages hide the reference from you without working fundamentally differently. How is that better?'' --AristotlePagaltzis 
+  
+''Because if things are designed well enough (!) you don't need that low level of access, even to do unintended things. Higher order functions, complex and nested types (lists, dictionaries/hashes, strings, in any combination), and a strong but lightweight object system (i.e. minimal syntax and typing) let you hack things up for the unusual case without making the usual case burdensome. C hides the ability to check or change the flags bits when arithmetic operations occur but assembly lets you do this any time you want, or to have a different function call method (e.g. for tail calls). We should all code in assembly all the time. How is that better?'' --JaredUpdike  
  
 !!There's More Than One Way To Do It 
 Perl people say this is a good thing, but the problem with theres more than one way to do it, is that noone ever does it the same way twice. To properly read a program you have to understand the 'idioms' that that program is written around. In Perl it's difficult to realise that "ah, thats a switch statement, I can see what that's going to do" because in perl there is no switch statement, you can roll your own (a nice idea), but, you can get half way through and discover someone's modified their idea of a switch statement slightly and now it has a side effect you didn't realise until you read the code very very carefully. In most languages you can learn a couple of constructs (for, while, do..until, if...then...else, functions) and you've learnt a good chunk of the language and can read most of it. (Even C++ which has a huge number of things (virtual private classes? who on earth would use such a thing?) you learn about the various flow control structures, and how to define/call functions/methods, and you can follow a good chunk of C++), however in perl, since theres so many ways of doing anything you have to learn all the idioms before you can read a sizable chunk of perl code since they are all used, randomly.