[Bioperl-l] For CVS developers - throw_not_implemented

Chris Fields cjfields at uiuc.edu
Thu Jun 1 01:42:54 UTC 2006



> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Stephen Gordon Lenk
> Sent: Wednesday, May 31, 2006 4:52 PM
> To: Hilmar Lapp
> Cc: bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] For CVS developers - throw_not_implemented
> 
> 
> Isn't it fairly standard in OO schemes/languages to have an exception
> thrown if a method
> can't be found at the
> end of a search up the class hierarchy? I recall being very mad at
> Smalltalk because "method
> not found" kept
> biting me. C++ has pure virtual base classes that do not allow objects to
> be instantiated
> directly; they are
> meant to be inherited and then implemented.

Perl will throw an error if it can't find a method in a class hierarchy.
It will do a few things first before dying, like looking for AUTOLOAD, etc.
AUTOLOAD has it's supporters and detractors; I try to stay away from it as
much as possible.

Not sure about C++ like pure virtual classes in Perl5, i.e. not allowing
direct object instantiation, but Perl6 is supposed to have them, at least
according to Apocalypse 12.  From what Mr. Wall says about OOP in Perl5,
it's essentially 'bolted on' but works with caveats (is 'private' really
'private'?).  Perl6 is rebuilt from scratch (internals are OO).

> Perl 6 was mentioned a bit back. Is this issue addressed there? Should it
> be? Do the Bioperl
> people feed their
> needs into Perl 6 so that all the code effort to make Bio::Root is handled
> for them in the next
> effort by Perl 6
> itself. Make the Perl 6 people solve these issues with your input, then
> you will not have to
> deal with
> implementing it yourselves. I'll just bet that you are not the only
> potential users of Perl 6 who
> will have to solve
> these issues eventually.

I think Perl6 will solve most (if not all) these problems since it's a
complete rebuild.  In fact, it's pretty much a new language altogether from
what I have seen (and the little I have played around with using Pugs).
Parrot is supposed to handle mixes of Perl5/Perl6, so it may not be
necessary to immediately convert all of bioperl to Perl6.  Though I have
also heard of a Perl5->6 converter in the works as well...  

>From an OO standpoint, I believe everything is considered an object in
Perl6, though it's not supposed to force you into using objects according to
the Apocalypses that I have read.  I actually see a lot there that reminds
me of C++ (but in a Perl-ish way, of course).  Apocalypse 12 is a good
primer, though you may want to go through the others first, they're heavy
slogging:

http://dev.perl.org/perl6/doc/design/apo/A12.html

Not sure what you mean by 'feeding our needs into Perl6'.  I have
periodically checked on perl6 progress and they seem to have everything well
under control.

Chris
 
> ----- Original Message -----
> From: Hilmar Lapp <hlapp at gmx.net>
> Date: Wednesday, May 31, 2006 5:21 pm
> Subject: Re: [Bioperl-l] For CVS developers - throw_not_implemented
> 
> >
> > On May 31, 2006, at 4:40 PM, Chris Fields wrote:
> >
> > > What about modules that have 'throw_not_implemented' statements
> > > present?
> >
> > Those are often if not always legitimate - the problem are those
> > that
> > don't have them but fail to override an inherited interface or
> > abstract method.
> >
> > If something is not implemented what is the better way to express
> > this other than throwing an exception? (and if it's not an
> > interface
> > or abstract base class, saying so in the documentation)
> >
> > 	-hilmar
> >
> > --
> >
> =========================================================
> ==
> > : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> >
> =========================================================
> ==
> >
> >
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list