Re: String.intern() thoughts

2003-12-04 Thread Peter B. West
Glen Mazza wrote: ... I think the next thing to consider is the storage of specified vs. computed values. Let's say we store pointers for many properties to the same {"property-name", "property-value"} pair. A specified property value of "10%" would not make this a very helpful data structure if

Re: String.intern() thoughts

2003-12-04 Thread Glen Mazza
Thanks for the explanation. Glen --- "Peter B. West" <[EMAIL PROTECTED]> wrote: > Glen Mazza wrote: > ... > > > > I think the next thing to consider is the storage > of > > specified vs. computed values. Let's say we store > > pointers for many properties to the same > > {"property-name", "prop

Re: String.intern() thoughts

2003-12-01 Thread Glen Mazza
--- "J.Pietschmann" <[EMAIL PROTECTED]> wrote: > Glen Mazza wrote: > > No need-the "gotcha" site you gave earlier did > give > > some specific drawbacks under string compares: > > > > http://mindprod.com/jgloss/gotchas.html#COMPARISON > > That's not a drawback. Interned strings allow > comparis

Re: String.intern() thoughts

2003-12-01 Thread J.Pietschmann
Glen Mazza wrote: No need-the "gotcha" site you gave earlier did give some specific drawbacks under string compares: http://mindprod.com/jgloss/gotchas.html#COMPARISON That's not a drawback. Interned strings allow comparision of references: String a="a".intern(); String b="a".intern(); if(

Re: String.intern() thoughts and more stats

2003-12-01 Thread John Austin
On Mon, 2003-12-01 at 02:11, Glen Mazza wrote: > --- John Austin <[EMAIL PROTECTED]> wrote: > > I mentioned yesterday that I thought I had read a > > comment > > by Bruce Eckel suggesting that String.intern() might > > be > > avoided. > > > > I could not find the reference in either the 2nd or >

Re: String.intern() thoughts

2003-12-01 Thread John Austin
On Mon, 2003-12-01 at 02:11, Glen Mazza wrote: > --- John Austin <[EMAIL PROTECTED]> wrote: > > I mentioned yesterday that I thought I had read a > BTW, The third drawback listed in the link above gave > "weak references" as an alternative implmentation--I'm > unsure what that construct is about--

Re: String.intern() thoughts

2003-11-30 Thread Glen Mazza
--- John Austin <[EMAIL PROTECTED]> wrote: > I mentioned yesterday that I thought I had read a > comment > by Bruce Eckel suggesting that String.intern() might > be > avoided. > > I could not find the reference in either the 2nd or > 3rd editions > of "Thinking In Java". > No need-the "gotcha"