Re:Google joins .NET Foundation as Samsung brings .NET suppo...
by int_19h on Wednesday November 16, 2016 @04:52PM
(#12971926)
It does them. But it repeats the story with generics, where back-compat (in this case, lack of reified generics) requires hacks for acceptable performance.
For example, in Java, you have this: http://docs.oracle.com/javase/8/docs/api/?java/util/function...
Note all the permutations. This is necessary, because there's no way to define a generic interface that would have acceptable perf, due to boxing. So you end up defining separate types for things like int->int, int->int->int, long->long etc. And then if you need e.g. bool->int, well, that's just too bad.
Whereas in C#, you just have Func<...> and Action<...>, and they work with all permutations of all primitive and user-defined types.
Re:Google joins .NET Foundation as Samsung brings .NET suppo...
by kuschku on Thursday November 17, 2016 @12:54PM
(#12979697)
> This is necessary, because there's no way to define a generic interface that would have acceptable perf, due to boxing.
Actually, that's going away with Java 9 (or 10). Luckily.
Re:Google joins .NET Foundation as Samsung brings .NET suppo...
by int_19h on Friday November 18, 2016 @09:12PM
(#12991624)
This is great to hear, but it also kinda reinforces the point - .NET generics were reified from the get go, back when they were introduced in 2005. Java got generics a few months earlier than .NET, if I remember correctly; but we're still waiting for them to fully catch up. By the time it does, people coming from C# will be asking about things like sequence comprehensions (well, they already do, since those have been around for 8 years) and pattern matching...
Re:Google joins .NET Foundation as Samsung brings .NET suppo...
by RivieraKid on Wednesday November 16, 2016 @05:13PM
(#12972075)
That doesn't affect me in any way though, from my POV, lambdas work.
Not by a big margin. Java 8 has lambda functions, which used to be the most painful aspect of the language for me.