- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Single abstract methods and closures
Mon, 2011-11-14, 13:58
Dear Scala users,
I remember there was talk about allowing to supply closures where a class with a single abstract method (SAM) was expected (cf. http://www.scala-lang.org/node/8744).Are there any news from this feature? Any plans to integrate it in the upcoming versions?
Regards,
Gilles.
I remember there was talk about allowing to supply closures where a class with a single abstract method (SAM) was expected (cf. http://www.scala-lang.org/node/8744).Are there any news from this feature? Any plans to integrate it in the upcoming versions?
Regards,
Gilles.
Mon, 2011-11-14, 16:57
#1
Re: Single abstract methods and closures
For proposed Java8-compat or are there other reasons?
Mon, 2011-11-14, 17:07
#2
Re: Re: Single abstract methods and closures
1) you can get rid of a lot of implicits
2) there are some performance advantages to SAMs
On Mon, Nov 14, 2011 at 4:54 PM, Simon Ochsenreither <simon [dot] ochsenreither [at] googlemail [dot] com> wrote:
2) there are some performance advantages to SAMs
On Mon, Nov 14, 2011 at 4:54 PM, Simon Ochsenreither <simon [dot] ochsenreither [at] googlemail [dot] com> wrote:
For proposed Java8-compat or are there other reasons?
Mon, 2011-11-14, 17:17
#3
Re: Re: Single abstract methods and closures
-------- Original-Nachricht --------
> Datum: Mon, 14 Nov 2011 17:01:07 +0100
> Von: Lieven Lemiengre
> An: scala-debate [at] googlegroups [dot] com
> Betreff: Re: [scala-debate] Re: Single abstract methods and closures
> 1) you can get rid of a lot of implicits
> 2) there are some performance advantages to SAMs
how can the compiler avoid wrapping the sam into a function when more than one sam is used?
>
> On Mon, Nov 14, 2011 at 4:54 PM, Simon Ochsenreither <
> simon [dot] ochsenreither [at] googlemail [dot] com> wrote:
>
> > For proposed Java8-compat or are there other reasons?
> >








