by pankratiev on 5/22/11, 5:30 PM with 65 comments
by old-gregg on 5/22/11, 8:12 PM
In my experience it's always been the opposite: C# guys have always looked down on Java folks. And rightfully so: the language itself is nicer, the standard library is much nicer, and the CLR+CIL are vastly superior to JVM, especially in memory management department.
by guard-of-terra on 5/22/11, 9:52 PM
I don't want this, seriously do not want. I don't want a language "with lovely features from C++". Explicit virtual, structs - please take those and leave me alone.
Lambdas are nice, some syntax sugar is nice, but not that creep.
Please don't take this as flamebait. I know a handful languages, I do backend development and I just absolutely don't need some language features and I fear that somebody would use them in their little library and would POISON the lifes of anybody who touches it.
Java has some "do not want" features too, like checked exceptions, but those are more or less solved these days.
by tzs on 5/22/11, 7:20 PM
by MartinCron on 5/23/11, 1:27 AM
by rudiger on 5/22/11, 5:44 PM
by teyc on 5/22/11, 10:31 PM
1) it does not have to worry about language standardization and the various community processes that accompany Java.
2) Anders is exceptionally good at deciding what language features are go/no go.
by SemanticFog on 5/22/11, 7:36 PM
by _Daniel_ on 5/22/11, 11:04 PM
Checked exceptions are not something that I'd happily give up. We do have unchecked exceptions (RuntimeException), and the JRE generally uses them where appropriate. But what about methods like Inflater.inflate, ImageIO.read, or Class.getMethod? If these didn't throw checked exceptions, we would sometimes forget to catch exceptions which should almost always should be caught. It would be a step in the direction of a weaker type system, unhelpful errors, and less graceful recovery.
Regarding initializers, we can do the same thing in Java by giving an initializer block to an anonymous class:
List<Integer> L = new ArrayList<Integer>() {{
for (int i = 0; i < 10; ++i)
add(i);
}};
by Niten on 5/22/11, 8:44 PM
Also the event / delegate thing makes C# really nice for GUI stuff.
by thepumpkin1979 on 5/22/11, 11:25 PM
by jschrf on 5/23/11, 4:29 AM
All those other things that people have already commented on like Lambdas, expression trees, events and delegates, are incredibly nice to have.
Here's the first thing I write when I start a Java project, followed directly by an abstract class based on it:
public interface ICallback<T> { public void Invoke(T state); }
by jhpriestley on 5/23/11, 2:23 AM