Scala function literals (or any function literal) derive from a particular
set of traits. It may be java classes are able to implement these traits
(nobody that i know attempted to do that), and then maybe they will become
supported as scala function types. But i think even that is a big if, since
scala compiler tinkers with bytecode a lot, and compatibility at bytecode
level is not guaranteed between scala major releases. Bottom line, even if
it is possible to write scala functions in java, it is definitely not
publicly documented feature.

On the other hand, it is possible to use "function-like" Colt classes such
as DoubleDoubleFunction just like a plain old reference-type object from
either scala or Java, which is exactly how it happens in the example given
in the question originally asked.

On Thu, Sep 25, 2014 at 12:24 AM, Ted Dunning <ted.dunn...@gmail.com> wrote:

> On Wed, Sep 24, 2014 at 11:09 PM, Dmitriy Lyubimov <dlie...@gmail.com>
> wrote:
>
> > Aggregate is Colt's thing. Colt (aka Mahout-math) establish java-side
> > concept of different function types which are unfortunately not
> compatible
> > with Scala literals.
> >
>
> Dmitriy,
>
> Is this because we have other methods that describe the characteristics of
> the function?
>
> What would be the Scala friendly idiom?  Additional traits?
>

Reply via email to