LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG-Social] Perl is a pool language

[ILUG-Social] Perl is a pool language

Smelly Pooh plop at redbrick.dcu.ie
Thu Oct 12 18:21:06 IST 2000


In reply to Niall O Broin's flatulent wordings, 
> The badness of Perl for big projects has been debated ad nauseum and the
> bottom line is that you can write un-readable code in Perl if you like, but
> equally you can write un-readable code in many other languages too - have a
> look at this, as mentioned earlier today on the main ILUG list
> 
> #include <stdio.h>
> 
> int main ()
> {
>   int element = 8, array[10];
>   array[element] = 123;
>   printf("Element %d is %d - or is that %d\n", 
>   element, array[element], element[array]);
>   exit (0);
> }

That code is intentionally obfuscated (although not enough that a mediocre C
programmer wouldn't spot it), you shouldn't see code like that unless the
author was going out of his way to make his code unreadable.  In the case of
PERL code, a lot of it is naturally obfuscated, because PERL is a mess with
idioms that are not only contrary to good language design, but that are also
internally inconsistent to PERL.  Stuff such as implicit variables which have
a gee whizz ain't that neat factor to them, certainly do not make code more
readable, and in fact adds an extra level of complexity to the language itself
(now people have to know about the implicit variables).  Stuff such as a
while(<INPUT>) line, the only context in which <INPUT> is supposed to assign
to $_.  PERL syntax and semantics in general are based on decades old
languages (C, SH, Awk), it does nothing amazingly new or clever, and if
anything, adds a lot of annoying baggage and ugly hacks.  The only thing it
has going for it is that the price of entry is quite low, if you know C and
shell scripts it should be a bit of a doddle to get into, and if you're
learning PERL because you need to get a job done kinda quick, there are plenty
of modules around that you probably want, otherwise, PERL plainly sucks

> It must be said that some of the supposedly obfuscated features of Perl are
> what allows it to be a very expressive language, so if you want to maintain
> a Perl project, you should have Perl programmers.

You don't have to be obfuscated and complex to be expressive, look at
languages like Scheme

> After all, if you wanted to enforce reabability, you should probably make
> coding in Cobol compulsory.

Have you coded in Cobol before?  Although syntactically very English (they say
to make marketting types thing they can understand code) that does not make it
readable.  I hope you're not trying to say that there is a trade off here
between readability and expressiveness, that if you want an expressive
language it must be difficult to read, and if you want a readable language it
must be unexpressive, because this is simply not true.




More information about the Social mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell