Has anyone sucessfully walked accross the line of midsize (tens of thousands of lines of code) application into the domain of huge business to business corporation while keeping perl's flexibility intact?
well... i'm presently up to around 30,000 lines of perl for a bioinformatics website i am working on. as is my fashion, it is heavily object-oriented and this has paid off signficantly in managing the way the project has grown in response to my personal whims and user requests.

while i do not pretend to be any kind of 133t perl haXor, i would say that the most difficult/frustrating thing about perl and perl OO is the lack of strong typing and possibly the lack of a full-featured, typed exception system, such as in java. it is simply too onerous to write code to catch every bug and/or foreseeable misuse of a given method or object -- especially when large and complex objects are extending and using other objects. i'm not saying it's impossible by any means -- just much more difficult than java because of the strong typing plus the compiler.

call it heresy if you will, but i sure wish perl had strong typing (and method prototypes)... loaded via a compile-time pragma... without adversely affecting execution speed...

it is very difficult indeed to have 30,000+ lines of accurately-documented OO perl code. but i am trying very hard to make it so. freeform text marked up as pod embedded in code sure has its place, but there is no comparison in perl for the javadoc utility, which again is made possible through java's (obsession with) typing and objects.

it seems very likely that OOP in perl6 will be more-or-less made a part off the core language (if you want it), instead of being tacked 'on-the-side'. hopefully there will also be some more OO 'syntactic sugar' keywords like 'class', 'extends', 'method', 'private', 'this' etc.. - even if these are just aliases to the more familiar 'package', '@ISA', 'sub', 'my', 'my $this = shift;' etc.

it would give me a nice warm feeling to be able to write...

use very_strict; class PerlModule extends SomeModule { our $Class_Data; method set_something ( int $something ) { this->_update_something( $something ); this->something = $something; } private method _update_something ( int $raw_something ) { # ... } }
...in perl. the lack of prototypes and typing in perl is the only reason i even know java.

j.a.dirty.p.h.


In reply to RE: Can perl be anything like Java? by d_i_r_t_y
in thread Can perl be anything like Java? by pos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.