That's true, that's why vavr has some CheckedRunnable CheckedFunction0* I but for some function we do can remove them and for exceptions ,I think user can make use of `Throwables.sneakythorw` or @sneakthrow from lombok too.
On 2023/03/17 13:06:58 Matthew Benedict de Detrich wrote: > From what I remember another reason behind these custom function interfaces > is that the Java interfaces don't allow throwing exceptions in the apply > whereas some parts of Akka/Pekko rely on this behaviour. > > On Fri, Mar 17, 2023 at 12:03 PM Arnout Engelen <[email protected]> wrote: > > > On Thu, Mar 16, 2023 at 11:36 PM PJ Fanning <[email protected]> wrote: > > > As part of https://github.com/apache/incubator-pekko-samples/pull/4, > > we've run into an issue where one API returns a > > org.apache.pekko.japi.function.Function<?> but we need to convert it to a > > org.apache.pekko.japi.Function<?>. > > > > > > Does anyone know how to convert from one type of Function to the other > > type of Function? > > > > > > https://github.com/sam-byng/incubator-pekko-samples/pull/2/commits/7e1c9b4dcaca632d844b32beda1f8b21055ae33a > > > > I haven't refreshed my memory on the details, but it is possible the > > only reason that there are two Function types there is because we > > wanted to change it, but had to introduce a second type to avoid > > breaking (binary?) compatibility in code already using the 'old' > > variation. > > > > Do we want to 'clean up' such situations in Pekko? Does that need to > > happen before our first release or can we keep some 'stabilization > > period' before we start promising binary compatibility? > > > > > > Kind regards, > > > > Arnout > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > -- > > Matthew de Detrich > > *Aiven Deutschland GmbH* > > Immanuelkirchstraße 26, 10405 Berlin > > Amtsgericht Charlottenburg, HRB 209739 B > > Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen > > *m:* +491603708037 > > *w:* aiven.io *e:* [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
