On Tue, Oct 4, 2011 at 9:09 AM, Yossi Itzkovich <[email protected]
> wrote:

>
> I would like to get feedback from people regarding the last part of the
> sentence. Do you think it's true ?
>

I guess it depends on various variables:
- Are we talking about Perl short scripts vs. actual applications?
- Are we talking about CLI/GUI/web?
- Are we talking about stuff that was written earlier?
- Object oriented? Ties?
- and more...

I can't answer about most Perl applications out there but most of the code
written at $work (whether by me, Erez Schatz or others) is written in clean
OO manner with a good separation of packages, share files and binaries. Most
of them are actually rather short. I would figure they're between a page and
a few pages. An average "page" is 44 lines. That means that most of them are
128 lines or less.

I think there are two major contributions to size:
- Smart algorithms (and I definitely don't mean golfing here, but accurate
algorithms)
- Elegant solutions: using the correct tools, the right way

A lot of code that I see (in Perl, Python, occasionally Ruby) implements
poor algorithms, horrible backwards solutions, terrible shortcuts or
extensive unnecessary work. You don't have to golf in order to write short
code, you just have to be more elegant. :)
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to