Libraries updates for extensions methods

"Zdeněk Troníček" tronicek at fit.cvut.cz
Tue Aug 14 03:56:08 PDT 2012


Probably I did not describe it clearly. I mean ImmutableIterator to
implement Iterator and throw UOE from the remove() method.
ImmutableIterator is meant only as help when implementing read-only iterator.
No ImmutableIterable is needed then.

Z.
-- 
Zdenek Tronicek
FIT CTU in Prague


Rémi Forax napsal(a):
> On 08/14/2012 12:22 PM, "Zdeněk Troníček" wrote:
>> "Reading is more important than writing." Not only on language level.
>> Which of these two is easier to understand for you when you read it?
>>
>> public Iterator<String> iterator() {
>>      return new Iterator<String>() {
>>          ...
>>      }
>> }
>>
>> public Iterator<String> iterator() {
>>      return new ImmutableIterator<String>() {
>>          ...
>>      }
>> }
>>
>> Z.
>
> Multiplying concepts that are too similar is a good way to make the
> maintenance of applications hard.
> Now that you have your ImmutableIterator, you need an ImmutableIterable,
> and so on.
>
> Understanding is more important than reading.
>
> Rémi
>
>
>
>



More information about the lambda-dev mailing list