Figured out something bizarre about combining lambdas just the other day.
Code like
static EqualsSupport makeEquals(Set> getters) {
EqualsSupport equals = (a, b) -> true;
for (var getter : getters) {
if (getter instanceof ObjectGetter) {
var g = (ObjectGetter) getter;
Hi,
For a long while, I couldn't think of what to reply with.
I just don't feel the problem of grouping fields together deserves to
distort the API that much.
I guess part of the problem is Java doesn't support a syntax for field
references (even though VarHandleDesc are already implemented.)
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Samedi 27 Avril 2019 00:15:07
> Objet: Re: Exotic classes
> It seems to me you have to do a lot of hacky stuff to get around the "ugly"
> API
> as you call it.
> Maybe
nevitably end up needing more support methods such as a toString method.
On Friday, April 26, 2019 at 8:13:17 AM UTC-7, Remi Forax wrote:
>
>
>
> --
>
> *De: *"Steven Stewart-Gallus" >
> *À: *"mechanical-sympathy" >
>
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Vendredi 26 Avril 2019 01:51:47
> Objet: Re: Exotic classes
Hi Steven,
thanks for spending some time on this,
> 1. Why
> public abstract class ObjectSupport {
> public abstract bo
1. Why
public abstract class ObjectSupport {
public abstract boolean equals(Object self, Object other);
public abstract int hashCode();
public static ObjectSupport of(Lookup lookup, String... fields) {
// impl details
}
// impl details
}
and not something like?
> De: "mechanical-sympathy"
> À: "mechanical-sympathy"
> Envoyé: Mardi 23 Avril 2019 18:23:48
> Objet: Re: Exotic classes
> Replies inline
> On Monday, April 22, 2019 at 12:37:19 PM UTC-7, Remi Forax wrote:
>>> De: "mechanic
Ts (everything but c1), so i've bundled
>> together several patterns i use for implementing dynamic language runtimes
>> into an Java API
>>
>> https://github.com/forax/exotic
>>
>> I would like to have your comments about those ex
Hi Steven,
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Samedi 19 Janvier 2019 05:19:06
> Objet: Re: Exotic classes
> On Friday, January 18, 2019 at 5:37:58 AM UTC-8, Rémi Forax wrote
>>> no, CHA only works on class, not on i
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Jeudi 17 Janvier 2019 07:50:13
> Objet: Re: Exotic classes
> I've been working on similar issues trying to optimise something
> heavily. I made a similar class to this one (I even had
I've been working on similar issues trying to optimise something
heavily. I made a similar class to this one (I even had a similar
API) but I found I called it MostlyFinal instead.
private static final MostlyConstant FOO = new MostlyConstant<>(42,
int.class);
private static final IntSupplier
like to have your comments about those exotic classes (it's already has
been done, it's stupid, it's not thread safe, etc)
regards,
Rémi
--
You received this message because you are subscribed to the Google Groups
"mechanical-sympathy" group.
To unsubscribe from this group and stop
12 matches
Mail list logo