On Mon, Feb 26, 2001 at 02:26:11PM -0800, Jon Stevens wrote:
> on 2/26/01 1:53 PM, "John McNally" <[EMAIL PROTECTED]> wrote:
> 
> > Is this only considered acceptable for String constants?
> 
> Yes IMHO. 

Well that's just a silly answer :-) What about int constants and other
native types.

> Also, in this case, it is patching code that is used within
> Turbine only...therefore, it should be done right.

So are you saying that public static final fields should never be used,
but we can't change the ones in the Peers to static accessor methods
because it'll break lots of people's code?

FWIW I go with the first one, all public fields are bad and should be
static accessor methods. But we can't just go and break what would
probably be thousands of lines of code by removing those static fields
from the Peers. 

But if we're leaving them there I don't think it makes any difference if
they're String type or TableColumn type - convince me otherwise :-P

> > FooPeer.COLUMN -> FooPeer.COLUMN.toString()
> 
> Yucky. More typing.

But I think John was saying you do this only where you actually need
access to the String, the main use for these constants is adding to a
Criteria object, and there the toString() method call wouldn't be
needed...

-- 
Sean Legassick
[EMAIL PROTECTED]
      Soy un hombre: nada humano me es extrano  
      
      


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to