Re: Exotic classes

2019-05-23 Thread Steven Stewart-Gallus
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;

Re: Exotic classes

2019-05-16 Thread Steven Stewart-Gallus
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.)

Re: Exotic classes

2019-04-27 Thread Remi Forax
> 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

Re: Exotic classes

2019-04-26 Thread Steven Stewart-Gallus
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" > >

Re: Exotic classes

2019-04-26 Thread Remi Forax
> 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

Re: Exotic classes

2019-04-25 Thread Steven Stewart-Gallus
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?

Re: Exotic classes

2019-04-24 Thread Remi Forax
> 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

Re: Exotic classes

2019-04-22 Thread Nitsan Wakart
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

Re: Exotic classes

2019-02-06 Thread Remi Forax
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

Re: Exotic classes

2019-01-18 Thread Remi Forax
> 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

Re: Exotic classes

2019-01-16 Thread Steven Stewart-Gallus
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

Exotic classes

2018-02-26 Thread Remi Forax
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