in reply to Can perl be anything like Java?
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...
...in perl. the lack of prototypes and typing in perl is the only reason i even know java.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 ) { # ... } }
j.a.dirty.p.h.
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: Can perl be anything like Java?
by merlyn (Sage) on Sep 21, 2000 at 10:01 UTC | |
by d_i_r_t_y (Monk) on Sep 22, 2000 at 02:58 UTC |