fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fenfire-dev] RDF traversal utility methods


From: Tuukka Hastrup
Subject: Re: [Fenfire-dev] RDF traversal utility methods
Date: Mon, 18 Aug 2003 11:44:12 +0300 (EEST)

On Mon, 18 Aug 2003, Asko Soukka wrote:
> Sun, 17 Aug 2003, Tuukka Hastrup kirjoitti:
> > Object[2] {components, largest}. I could return an iterator that gives the
> > largest first.
> 
> But AFAIK, we have been avoiding returning arrays. Instead of returning an 
> array, a reference to the result array is taken as parameter. For example, 
> many methods of VobCoorder (getSqSize, transformPointsX),

You still haven't told me any reason. If it's not in a style guide, there 
should be a good reason before doing something in a difficult and 
convoluted way ;-)

Sometimes you don't want to create a new array object per method call, so 
you give the result object "template" in the call, and reuse it. Here, 
getComponents will take its time to run anyway, and it's not called often 
 -- once when FenMM starts, right?

My issue in returning an array is that it's not typical Java style. That's 
why it wasn't a complete joke suggesting that we define a class for the 
return type. It just feels a bit overkill.

-- 
-- Trying to catch me? Just follow up my Electric Fingerprints
-- To help you: address@hidden
                http://www.iki.fi/Tuukka.Hastrup/
                IRCNet: Stugge/tuukkah @#pii,#fenfire,#ynna
                Jabber ID: address@hidden, ICQ #11321669





reply via email to

[Prev in Thread] Current Thread [Next in Thread]