Re:Java Developers
by icebraining on Tuesday July 22, 2014 @05:34AM
(#8068037)
I don't think Android supports Java 8, though.
Re:Java Developers
by needusername on Tuesday July 22, 2014 @06:23AM
(#8068184)
I don't think Android supports even Java 7. Sure, maybe source level but AFAIK invokedynamic and method handles are still missing.
Re:Java Developers
by mike_hearn on Tuesday July 22, 2014 @07:27AM
(#8068347)
There's a thing called RetroLambda which purports to be a backport of lambdas to older versions of the runtime/platform.
However hopefully now ART is successfully launching they'll go back to upgrading the base foundation and move it beyond Java 6.
Re:Java Developers
by Alphasite_ on Tuesday July 22, 2014 @05:38AM
(#8068051)
I thought there was some work to support Lambdas in ART?
Re:Java Developers
by on_and_off on Tuesday July 22, 2014 @07:28AM
(#8068348)
There is a retro-lambda library that allows to write lambda expressions. It is compiled to jdk 6 compatible bytecode though.
Re:Java Developers
by ivanlubenko on Tuesday July 22, 2014 @06:32AM
(#8068212)
I like your comment. Do you have any examples of C# libraries that use the ideas you're talking about? Or even better - do you know of a tutorial or something where I can clearly see the two approaches compared and contrasted?
Nancy: http://nancyfx.org
Contrast that with Microsoft's WCF: http://www.codeproject.com/Articles/105273/Create-RESTful-WC...
Quartz: http://www.quartz-scheduler.net (hint: it's gigantic)
Contrast with
private void ScheduleRepeated(Action task, TimeSpan interval)
{
Task.Run(async () =>
{
while (true)
{
await Task.Delay(timeSpan);
task();
}
});
}
Remarkably many Gang of Four design patterns are unneeded once you can pass functions around. The C# world is now learning this: when C# 1 and 2 were popular, the ecosystem went right after Java in the kinds of boilerplate that the author describes. Now, many years of Func and Action goodness later, there's a large part of the community that codes way more to the point, and this part is growing. People who release C# libraries in 2014 with factories adapters and multiple layer inheritance hierarchies are laughed at.
Since Java 8, Java too has an accessible way to pass functions around. Not really functions, because Java, but in practice it works the same way. This means that there's nothing technologically that's holding the Java community from making these improvements, too.
I hope it happens.