Responding to Andy Oliver's Why C# is better than Java, part two. 6-10
- Structs In C#, a struct is a not-quite-object that lives on the stack and can't do inheritance. I assume structs get passed by value too? Hello, serious bug pattern. This adds a great deal of “When is an object not an object? When it's value type that can't be extended!” complexity, which isn't worth the pretty trivial gain.
- Substitution Parameters java.text.MessageFormat has existed since the 1.0 days.
- #define For the example given, look up Java's compilation. For other uses of #define, the preprocessor is a hack. There's generally a more elegant solution staring you in the face.
- Verbatim Strings These are nice syntactic sugar. Notice how the only things that pass the test of really being advantages of C# over Java are “nice syntactic sugar”? If you really cared, you could hack verbatim strings into the Jikes compiler in an hour or two.
- Foreach Evil syntactic sugar. Foreach is a lame, feeble excuse for not having blocks/closures. It embarrasses me that Java is planning on copying this mistake.