Indexing access for Lists and Maps considered harmful?
Neal Gafter
neal at gafter.com
Tue Jun 23 11:20:41 PDT 2009
On Tue, Jun 23, 2009 at 11:12 AM, Joseph D. Darcy <Joe.Darcy at sun.com> wrote:
> Neal Gafter wrote:
>
>> Why would a language-support method like Puttable.put return a value that
>> the generated code is required to ignore?
>>
>
> I am not proposing that the value is required to be ignored. My current
> thinking is that compiler warnings are sufficient to deal with the multiple
> assignment situation in indexed access. Aggregates outside
> java.util.Collection could choose to be Puttable<KeyType, Void.class> to
> avoid having to return some value.
That still requires the implementation to return something to be ignored
(null), and is not parallel the the language's existing semantics for
assignment expressions.
More information about the coin-dev
mailing list