MumbleCloseable

Joe Bowbeer joe.bowbeer at gmail.com
Fri Jun 28 12:53:39 PDT 2013


CloseMeMaybe?

Some additional questions:

1. What happens if close needs to throw an exception?  Why is this form of
close different from others?

2. Why is this a close() method instead of a dispose() or release() method?

Concerning names, I've lost track of what the expected programming style
for this is.  It would be a great aid if I could see three exemplary
snippets.

I'm also surprised that no one has brought up the May vs. Might
distinction, so I will.

--Joe



On Fri, Jun 28, 2013 at 12:31 PM, Brian Goetz <brian.goetz at oracle.com>wrote:

> Seriously?  There's a bikeshed begging to be painted, and no one has a
> brush?
>
>
> On 6/27/2013 11:21 AM, Brian Goetz wrote:
>
>> OK, which do we like best:
>>
>>      MayHoldCloseableResource
>>      MayHoldResource
>>      MayHoldCloseable
>>
>> ?
>>
>> On 6/26/2013 6:45 PM, Doug Lea wrote:
>>
>>> On 06/26/13 16:36, Brian Goetz wrote:
>>>
>>>> What do we think of this name?
>>>>
>>>>    MayHoldCloseableResource
>>>>
>>>>
>>> The royal We thinks: fine :-)
>>> If we can't have a stunningly great name, we can at least have
>>> a stunningly clear one.
>>>
>>> -Doug
>>>
>>>
>>>  Shortenings might include:
>>>>
>>>>    MayHoldResource
>>>>    MayHoldCloseable
>>>>
>>>>
>>>>
>>>> On 6/25/2013 11:37 AM, Brian Goetz wrote:
>>>>
>>>>> Actually,
>>>>>
>>>>> MayHoldCloseableResource
>>>>>
>>>>> seems not too bad.  It is a tad wordy, but relatively few people will
>>>>> have to type it, and reading it is pretty clear -- this object may hold
>>>>> a closeable resource.
>>>>>
>>>>> On 6/25/2013 11:14 AM, Brian Goetz wrote:
>>>>>
>>>>>> These together provide something better than any other related
>>>>>>> schemes I know. I think that if we cam up with stunningly
>>>>>>> good names for these, the plan would be completely uncontroversial.
>>>>>>>
>>>>>>
>>>>>> MayHoldResource
>>>>>> HoldsResource
>>>>>> MayRequireClosing
>>>>>> ...
>>>>>>
>>>>>
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130628/676cd1d9/attachment.html 


More information about the lambda-libs-spec-experts mailing list