News for hackers. Stuff that matters.
Re:What goes into Java 8? by SwearWord on Tuesday October 02, 2012 @09:42AM (#4601876)
.net 3.0 goes into Java 8
Re:What goes into Java 8? by lmm on Tuesday October 02, 2012 @11:02AM (#4602325)
If only. Where are my extension methods?
Re:What goes into Java 8? by randomguy7788 on Tuesday October 02, 2012 @11:18AM (#4602406)
default methods in interfaces will more or less mimic the same behavior.(sorta like mixins its not exactly the same but yeah lol)

    class SomeClass implements Linq {}

    public interface Linq { 
        public IEnumerable where(Func) { default implementation... }

        public IEnumerable orderBy(Func) { default implementation... }
    }
Re:What goes into Java 8? by jmcqk6 on Tuesday October 02, 2012 @03:30PM (#4603769)
C# really needs something similar to this. How many times have I implemented INotifyProgertyChanged and INotifyPropertyChanging. They're the exact same implementation every time. Now I've gone on to a base notify propery changed class that I can inherit from, but the mix-in approach, or the default implementation could be perfect.
Re:What goes into Java 8? by lmm on Tuesday October 02, 2012 @11:31AM (#4602470)
That's a good thing, but it doesn't let me add my own methods to existing classes - I can subclass and mixin an interface, but instances I get back from library methods won't have that extra interface.
Re:What goes into Java 8? by msgilligan on Tuesday October 02, 2012 @12:19PM (#4602724)
You can do that with Groovy.
Re:What goes into Java 8? by lmm on Tuesday October 02, 2012 @12:26PM (#4602767)
Or with scala, and I do, but we're talking about Java 8 here.