[The following message from Josh bounced because Josh apparently sent
it from an address <[email protected]> different than the one
he is subscribed at <[email protected]> -- I'll try to catch these,
but if you have switched your standard email address, please update
the majordomo]
Bill,
My feeling is that it isn't worth the effort to allow escapes. The idiom
proposed by Jan-Willem seems far more natural. If you need a static factory in
lieu of a constructor anyway, you might as well do it right. That said,
there's plenty of code in existence that "registers" an object inside a static
data structure as part of construction. I'm pretty sure that the Java platform
libraries contain such code. I'm afraid that such code is just broken.
Josh
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:27 EDT