Feedback and comments on ARM proposal - resend

Joshua Bloch jjb at google.com
Thu Mar 19 17:55:25 PDT 2009


Neal,

 I find this comment offensive,


Sorry.  I really did not mean to offend. I do believe that the particular
case of iterables requiring termination is a red herring.  I know C#
supports it, but Java went the other way a long time ago. I believe that
you're the only one who as expressed  enthusiasm for this use case.  I see
it as harmful scope creep that could keep a really important facility out of
the next release.  The proposed construct was designed to address a severe
problem with existing types.

especially considering your disagreement with Howard and
> Jeremy about declaration scope rather than a new block-structured
> statement form,


Not really a disagreement. In the end, we both came to the conclusion that
block-structured was probably the right thing for Java today.


> or with me and Peter and Stefan about whether Lock is
> an important use case,


Important or not, it isn't a use case for this construct.  It's specifically
excluded from this proposal.  I offered to write a proposal for locks, but
people didn't seem all that interested so I didn't write it.  Doug Lea
himself isn't interested.  He's fine with try-finally for that purpose.
 Unlike closing closeables, people don't get unlockng locks wrong most of
the time.  Yes, you could save a few characters of typing and perhaps make
your code a bit clearer, but it's not even a common use case.


> or with me and Bob Lee about whether suppressed
> exceptions be handled by clients, etc.


Not sure what you mean by this one, but I'd love to know!

I'm still hoping to see a revision of the proposal that incorporates
> the changes you suggested be considered: the changes to the Disposable
> interface, support for an expression as well as a declaration, a
> variation to suppress the exception on close, and recording suppressed
> exceptions.  When do you anticipate a refinement of the proposal will
> include these for further analysis?


In the next couple days.  I had hoped to have it out by now, but I've been
awfully busy lately.  (A family emergency has turned me into a single
working dad for the week.)

          Sorry the proposal isn't revised yet, and sorry if I offended,

          Josh



More information about the coin-dev mailing list