Iterator/size() (was: [Biocorba-l] BSANE and bioCORBA)
Juha Muilu
muilu@ebi.ac.uk
Fri, 01 Jun 2001 16:46:53 +0100
Martin Senger wrote:
>
> >
> > Perhaps the size() method should not be in the iterator.
> >
> Definitely my opinion.
>
> >
> > The method can be a pain as you said, because server impl must scan all
> > the elements (e.g.. annotations in this case).
> >
> But it's a must (IMHO). I cannot imagine to implement robust clients
> without being able to know first what I can get back. But if you feel that
> such features would be long and difficult for some server implementation,
> put there an exception (not_coutable, not_known, not_implemented,
> whatsever).
>
I agree with you and I like to have the "size" thing there. Either in
the iterator or in the entity who use the iterator (latter is
preferably. See how the iterators are currently used)
Some have raised the issue that it can be tricky to implement on the
server side... As you said it must be implemented somehow. Having
exception there just would encourage to bad coding.
> Martin
>
> --
> Martin Senger
>
> EMBL Outstation - Hinxton Senger@EBI.ac.uk
> European Bioinformatics Institute Phone: (+44) 1223 494636
> Wellcome Trust Genome Campus (Switchboard: 494444)
> Hinxton Fax : (+44) 1223 494468
> Cambridge CB10 1SD
> United Kingdom http://industry.ebi.ac.uk/~senger
--
+--------------------------------------------------------------------+
|Juha Muilu, Ph.D., EMBL Outstation| Email: muilu@ebi.ac.uk |
|European Bioinformatics Institute | Phone: +44 (0)1223 494 624 |
|Wellcome Trust Genome Campus | Fax: +44 (0)1223 494 468 |
|Hinxton, Cambridge CB10 1SD, UK | http://industry.ebi.ac.uk/~muilu|
+--------------------------------------------------------------------+