Tom Tromey ([EMAIL PROTECTED]) wrote:
> In some cases, where the Classpath version of a given class is clearly
> the one to choose, "merging" can be accomplished by simply overwriting
> the libgcj version.
> 
> I'm going to do that more or less at random.  Today I'm doing it with
> the java.io.Piped* classes.

I'm kind of surprised you thought those classes were superior.  I seem to
recall that I was dis-satisfied with my implementation.  Please be sure to
thoroughly test them.

> Two notes on these classes though:
> 
> 1. It seems to me that having the parameters (pipe_size,
> try_not_to_block) be properties which are statically initialized isn't
> all that useful.  A program that sets something like the
> `try_not_to_block' will break any library written to the Sun
> "standard" which uses this class.  Is there some scenario where this
> property is actually used?

In retrospect, non-blocking behavior should probably be the default. 
I was overly worried that since the Javadocs say that you'll get a short
count at end of stream, that would be the only time you would get a
short count.  I wanted some way to specify that the method should return
if some data was available now, but it would have to block to get the
rest of the amount requested.  In all cases, the method will block if
there is no data to be returned.

Whenever I wanted to enable "value added" functionality, or configure things
for which there is no "standard" method to do so, I used properties. 
Perhaps statically setting things based on this isn't the best idea, but
I couldn't think of anyway else to do it without breaking compatibily.
In all of the cases I'm aware of, none of these values should break anything
that isn't aware of them.
 
> 2. Is there some document describing the indentation style.  I find it
> oddly inconsistent.  For instance, synchronized blocks seem to be
> indented differently from everything else.  Is this the universal
> Classpath style?

My code is basically the GNU style, adopted to Java.  Other people use
their own styles which may not be the same.  I think most people use
Sun's gawdawful coding style.  Could you point me at some synchronized
blocks for examples?  I'll admit that I had to go back and tack a few
of those one after I wrote the code, and I may not have re-indented everything.

-- 
Aaron M. Renn ([EMAIL PROTECTED]) http://www.urbanophile.com/arenn/

Reply via email to