r
their “potential problems” categories.
Sent from Mail for Windows 10
From: Stuart Marks
Sent: Monday, October 19, 2015 03:13
To: joe darcy;Andrew Haley
Cc: core-libs-dev
Subject: Re: RFC: draft API for JEP 269 Convenience Collection Factories
On 10/18/15 10:45 AM, joe darcy wrote:
> On 10/17/
;
and I'm left wondering how much utility is in a truly immutable List that
no-one else can freely share trusting it to be immutable. Having to sprinkle
some List.ensureImmutable(immaybemutableList) method calls everywhere would be
pretty bad.
Sent from Mail for Windows 10
From:
On 10/18/15 10:45 AM, joe darcy wrote:
On 10/17/2015 10:10 AM, Andrew Haley wrote:
On 10/17/2015 05:46 PM, Stuart Marks wrote:
(I view calling an "inherited" class static method to be poor coding style, but
neither javac nor NetBeans warns about it.)
That surely can be fixed. Should we start
On 10/17/2015 06:46 PM, Stuart Marks wrote:
On 10/10/15 6:55 AM, Remi Forax wrote:
There is an issue with LinkedHashMap (resp LinkedHashSet),
it inherits from HashMap /facepalm/, and static methods are
accessible through class inheritance /facepalm/.
So if LinkedHashMap doesn't declare som
On 10/17/2015 10:10 AM, Andrew Haley wrote:
On 10/17/2015 05:46 PM, Stuart Marks wrote:
(I view calling an "inherited" class static method to be poor coding style, but
neither javac nor NetBeans warns about it.)
That surely can be fixed. Should we start a feature request?
I believe
java
Thank you Stuart for yours comments!
On 17.10.2015 20:23, Stuart Marks wrote:
On 10/14/15 5:56 AM, Ivan Gerasimov wrote:
Map m1 = MyCollections.
ofKeys( 1, 2, 3, 4, 5)
.vals( 'a', 'b', 'c', 'd', 'e');
Yes, we considered a bunch of different
On 10/14/15 10:56 AM, Kevin Bourrillion wrote:
(Sorry that Guava questions were asked and I didn't notice this thread sooner.)
Hi Kevin, thanks for this feedback. It's still timely, as it's helping to
improve the proposal.
Note that we have empirically learned through our Lists/Sets/Maps factory
On 10/14/15 5:56 AM, Ivan Gerasimov wrote:
Map m1 = MyCollections.
ofKeys( 1, 2, 3, 4, 5)
.vals( 'a', 'b', 'c', 'd', 'e');
Yes, we considered a bunch of different alternatives.
It looks like you're wrestling a bit with type inference :-), gi
On 10/17/2015 05:46 PM, Stuart Marks wrote:
> (I view calling an "inherited" class static method to be poor coding style,
> but
> neither javac nor NetBeans warns about it.)
That surely can be fixed. Should we start a feature request?
Andrew.
On 10/17/2015 05:46 PM, Stuart Marks wrote:
> (I view calling an "inherited" class static method to be poor coding style,
> but
> neither javac nor NetBeans warns about it.)
That surely can be fixed. Should we start a feature request?
Andrew.
On 10/10/15 6:55 AM, Remi Forax wrote:
There is an issue with LinkedHashMap (resp LinkedHashSet),
it inherits from HashMap /facepalm/, and static methods are accessible through
class inheritance /facepalm/.
So if LinkedHashMap doesn't declare some methods of(),
LinkedHashMap.of("foo")
will
On 14 October 2015 at 18:56, Kevin Bourrillion wrote:
> Note that we have empirically learned through our Lists/Sets/Maps factory
> classes that varargs factory methods for mutable collections are almost
> entirely useless.
Having taken a few days to think it over, I reluctantly think that
Kevin
---
> De: "John Rose"
> À: "Kevin Bourrillion"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 14 Octobre 2015 22:46:40
> Objet: Re: RFC: draft API for JEP 269 Convenience Collection Factories
>
> On Oct 14, 2015, at 10:56 AM, Kevin Bourrillion wrote
ample,
LinkedHashMap.of() will return a HashMap.
so +1 to have methods of() only on interfaces.
Rémi
- Mail original -
> De: "John Rose"
> À: "Kevin Bourrillion"
> Cc: "core-libs-dev"
> Envoyé: Mercredi 14 Octobre 2015 22:46:40
> Objet: Re:
?
Rémi
- Mail original -
> De: "Stephen Colebourne"
> À: "core-libs-dev"
> Envoyé: Jeudi 15 Octobre 2015 16:28:00
> Objet: Re: RFC: draft API for JEP 269 Convenience Collection Factories
>
> I've been working on a Java 8 wrapper class around double
> On 15 Oct 2015, at 16:28, Stephen Colebourne wrote:
>
> I've been working on a Java 8 wrapper class around double[] in my day
> job, and added the following factory method:
>
> /**
> * Obtains an instance with entries filled using a function.
> *
> * The function is passed the array i
I've been working on a Java 8 wrapper class around double[] in my day
job, and added the following factory method:
/**
* Obtains an instance with entries filled using a function.
*
* The function is passed the array index and returns the value for
that index.
*
* @param size the
gt;From: Paul Sandoz
>Sent: Wednesday, October 14, 2015 11:38
>Cc: core-libs-dev
>Subject: Re: RFC: draft API for JEP 269 Convenience Collection
>Factories
>
>
>
>> On 14 Oct 2015, at 06:18, Stuart Marks
>wrote:
>> I'm not entirely sure what to take from
.
Sent from Mail for Windows 10
From: Kevin Bourrillion
Sent: Wednesday, October 14, 2015 19:56
To: Stuart Marks
Cc: core-libs-dev
Subject: Re: RFC: draft API for JEP 269 Convenience Collection Factories
(Sorry that Guava questions were asked and I didn't notice this thread
sooner.)
On Oct 14, 2015, at 10:56 AM, Kevin Bourrillion wrote:
> Anyway, since we created these methods, they became an attractive nuisance,
> and thousands of users reach for them who would have been better off in
> every way using an immutable collection. Our fondest desire is to one day
> be able to de
Hi Stuart!
Most of the API is pretty straightforward, with fixed-arg and varargs
"of()" factories for List, Set, ArrayList, and HashSet; and with
fixed-arg "of()" factories and varargs "ofEntries()" factories for Map
and HashMap.
Has it been considered to separate a Map creation into two s
;Sent: Wednesday, October 14, 2015 11:38
>Cc: core-libs-dev
>Subject: Re: RFC: draft API for JEP 269 Convenience Collection
>Factories
>
>
>
>> On 14 Oct 2015, at 06:18, Stuart Marks
>wrote:
>> I'm not entirely sure what to take from this. If it were clearly
&g
eft on the table.
Sent from Mail for Windows 10
From: Paul Sandoz
Sent: Wednesday, October 14, 2015 11:38
Cc: core-libs-dev
Subject: Re: RFC: draft API for JEP 269 Convenience Collection Factories
> On 14 Oct 2015, at 06:18, Stuart Marks wrote:
> I'm not entirely sure what to take
On 14 October 2015 at 10:38, Paul Sandoz wrote:
>> On 14 Oct 2015, at 06:18, Stuart Marks wrote:
>> I'm not entirely sure what to take from this. If it were clearly
>> exponential, we could say with confidence that above a certain threshold
>> there would be vanishingly little benefit adding mo
> On 14 Oct 2015, at 06:18, Stuart Marks wrote:
> I'm not entirely sure what to take from this. If it were clearly exponential,
> we could say with confidence that above a certain threshold there would be
> vanishingly little benefit adding more arguments. But since the curve seems
> to flatte
On 10/10/15 9:10 AM, Louis Wasserman wrote:
If you're asking about why we stopped where we did, we collected actually
rather a lot of data on the size of static collection constants using
immutable collections, both with builder syntax and without.
https://github.com/google/guava/issues/2071#is
olebourne"
> > À: "core-libs-dev"
> > Envoyé: Vendredi 9 Octobre 2015 15:11:47
> > Objet: Re: RFC: draft API for JEP 269 Convenience Collection Factories
> >
> > On 9 October 2015 at 00:39, Stuart Marks
> wrote:
>
> [...]
>
> > &g
- Mail original -
> De: "Stephen Colebourne"
> À: "core-libs-dev"
> Envoyé: Vendredi 9 Octobre 2015 15:11:47
> Objet: Re: RFC: draft API for JEP 269 Convenience Collection Factories
>
> On 9 October 2015 at 00:39, Stuart Marks wrote:
[...]
>
- Mail original -
> De: "Stuart Marks"
> À: "Stephen Colebourne"
> Cc: "core-libs-dev"
> Envoyé: Samedi 10 Octobre 2015 01:11:09
> Objet: Re: RFC: draft API for JEP 269 Convenience Collection Factories
>
>
>
> On 10/9/15 6:
On 10/9/15 6:11 AM, Stephen Colebourne wrote:
On 9 October 2015 at 00:39, Stuart Marks wrote:
1. Number of fixed arg overloads.
Guava follows this pattern:
of(T)
of(T, T)
of(T, T, T)
of(T, T, T, T... elements)
whereas the proposal has
of(T)
of(T, T)
of(T, T, T)
of(T... elements)
I'd be
On 10/8/15 7:39 PM, Paul Benedict wrote:
I don't think the statements "Creates an unmodifiable set containing X elements"
is always true. Since sets cannot have duplicates, it's possible passing in X
elements gives you less than that based on equality. I think the Set docs should
say "...X poss
On 09/10/15 13:08, Peter Levart wrote:
Hi,
On 10/09/2015 04:39 AM, Paul Benedict wrote:
I don't think the statements "Creates an unmodifiable set containing X
elements" is always true. Since sets cannot have duplicates, it's
possible
passing in X elements gives you less than that based on equal
On 9 October 2015 at 00:39, Stuart Marks wrote:
> 1. Number of fixed arg overloads.
Guava follows this pattern:
of(T)
of(T, T)
of(T, T, T)
of(T, T, T, T... elements)
whereas the proposal has
of(T)
of(T, T)
of(T, T, T)
of(T... elements)
I'd be interested to know why Guava did it that way and w
Hi,
On 10/09/2015 04:39 AM, Paul Benedict wrote:
I don't think the statements "Creates an unmodifiable set containing X
elements" is always true. Since sets cannot have duplicates, it's possible
passing in X elements gives you less than that based on equality. I think
the Set docs should say "..
I don't think the statements "Creates an unmodifiable set containing X
elements" is always true. Since sets cannot have duplicates, it's possible
passing in X elements gives you less than that based on equality. I think
the Set docs should say "...X possible elements if unique". Wordsmith
something
35 matches
Mail list logo