[Bioperl-l] method naming
dmessina at wustl.edu
Wed Jun 13 12:41:53 EDT 2007
> 1) Is there any preference on how to name a method that returns a
> list of class instances vs. data? I have seen 'each' (each_Location,
> each_tag_value) vs. 'get_all' (get_all_tags, get_all_SeqFeatures) vs.
> simple (hits, hsps).
I'd prefer 'get_all' because it's more intuitive to me what the
method is doing. 'Each' is too programmer-y.
> 2) Do we want have methods which return objects have the object name
> in Title Case (each_Location, get_Seq_by_id, etc) or does it really
I like Title Case because it reinforces the notion that what you're
getting back is a specific object with that name (Seq) rather than
the generic thing that the name represents (AGTCTGTGATAT, the actual
sequence as a string).
More information about the Bioperl-l