[Biojava-dev] Feature Templates

Matthew Pocock matthew_pocock at yahoo.co.uk
Mon Sep 8 05:05:19 EDT 2003


 --- Len Trigg <len at reeltwo.com> wrote: > Mark
Schreiber wrote:
> > I think that a copy is better than a reference.
> The question is
> > would a shallow copy be OK or should it be a deep
> copy?
> 
> I have changed the SimpleFeature constructor so that
> rather than
> directly referencing the template annotation, it
> uses the existing
> SimpleAnnotation(Annotation) constructor. If deep
> copies are the way
> to go, it should probably happen in that
> constructor. 

IMHO, the only case that you would want to enforce a
deep copy would be if a property of an annotation is
itself an annotation. Deep coppying of other
properties will lead to badness I think.

> 
> BTW: SimpleFeature could do with a pretty printer
> running over
> it... Are there BioJava coding conventions? (I've
> been going with the
> flow of whichever file I've been editing.)

The one thing that mucks things up is mixing in tabs
with spaces. I know things like emacs like to put them
in, but they cause the most formatting hastle of all.

I tend to use 2 char indent, spaces after casts &
commas, [] after type and before variable, one
declaration per line, things that get broken across
lines get lined up on +1 or +2 indents or alignmed
with '(' - depending, and attempt to wrap at 80 char.
In truth, I hit the 'format this code' button in my
IDE when files look too uglee, and accept that (but
then I've had a bit of a discussion with my IDE over
what is and isn't acceptable).

If coding style is an issue, could we get all checkins
pretified by cvs prior to commit? Not sure if CVS can
do this kind of thing.

> 
> 
> Cheers,
> Len.
> 

Matthew

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk


More information about the biojava-dev mailing list