geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill de hÓra <b...@dehora.net>
Subject Re: [i18n] Hardcoded message strings
Date Thu, 21 Aug 2003 21:42:07 GMT
Alex Blewitt wrote:

> My point was not the parse pattern itself; you'll note that in both 
> examples it's there. What my point was is that there's very little point 
> in building it up in memory using a StringBuffer, only to then write out 
> the string as a whole, when you can write out the individual parts to 
> the stream and get the concatenation for free.
> 
> IIRC the Java text classes parse the pattern and then build a string 
> internally as a StringBuffer, then convert it to the string all in one 
> go. My point was that it would be possible to write a log method that 
> did not do that, but instead wrote it out to a stream in one go.
> 
> I can provide demo code if I'm not making the point clear :-)

Alex,

Totally clear. Does this not fall under the category of small 
efficiencies tho'? That's assuming it is more efficient (I think it 
might well be with a well-written lexer).

Bill de hÓra




Mime
View raw message