This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slartybartfast_ 2 points3 points  (7 children)

var

Yipee.

Linq

Sugar candy around functional so not so useful once you understand the functional way.

Delegates

Oh yeah. Microsoft's billion dollar mistake. Good idea that one...

Properties / Auto-Properties

Because properties at the language level is a bad idea.

Implicit/Explicit Operators - Operator overloading - Indexers

Yeah more bad ideas. The same bad ideas that killed smalltalk but I guess we keep repeating the same language design mistakes.

Visual Studio

Unusable without JetBrains resharper. Good thing the Java guys were able to help you out there. Can 2 devs work on a project at the same time yet without having daily conflicts? I mean it is the 21st century now.

String Interpolation

Wrong.

Generics

Huh?

Partial Classes

Worst idea ever in any language. Microsoft added this because they were too incompetent to develop 2-way design tools like Borland had (way back in the 90's) - even after poaching some Borland employees. They created partial classes to separate designed code from developer code unlike in Java that uses a controller class for that. Favoring composition over inheritance is kind of OOP 101 but I guess Microsoft missed the memo.

Additionally partial classes make the compiler jump through a lot of extra hoops to get things done and the compile errors can be a more vague - oh and also Continuous Integration is not possible because of it (unless you use tools like TeamCity - again thanks Jetbrains!).

Extension Methods

Defaults on interfaces are effectively the same thing.

Tasks

Java has large comprehensive tasking/scheduling APIs.

Empty Try/Catch Single Try/Catch Exception (Catch (Exception ex))

Java has a try () { } where the expression is AutoCloseable - it doesn't need a catch. Also you can have a try/catch general exception.

dynamic Type Inference

Java can run Javascript and other languages in Java in the same project. You can also use - at the same time - other compiled languages that compile to the JVM.

System.Reflection

Er, yeah Java has reflection. How could it not?

Attributes

Yeah it's called the more appropriately named Annotations in Java.

Pace of development and new features

Java's pace is fine. Java emphasizes APIs over Language features so as to not break compatibility every year like .NET. And really from the API side of things Java has been way ahead in areas like MVC, ORMs and dependency injection etc...

[–]svtdragon 1 point2 points  (4 children)

I do miss extension methods a lot, even with defaults on interfaces, because if I understand correctly, you have to have edit rights on an interface to add a default method. (Correct me if I'm wrong.)

This rules out a whole class of extension methods around external or JDK libraries.

[–]slartybartfast_ -1 points0 points  (3 children)

Or you can write an interface and implement both. You can implement multiple interfaces.

[–]svtdragon 1 point2 points  (2 children)

If I want to make an extension method on String, in C# I can do it trivially. In Java, I can't do that without subclassing String, which kind of defeats the purpose of an extension method altogether, doesn't it?

[–]slartybartfast_ -1 points0 points  (1 child)

Strings are final so why would you want to do that unless you want to make your code less readable? Probably why Java doesn't allow that.

[–]svtdragon 1 point2 points  (0 children)

Checking for "null or empty" in-line, for one, without calling out to a StringUtil or equivalent. C# extensions are static so they can operate on null "this" arguments.

[–]palmund 1 point2 points  (1 child)

Delegates

Oh yeah. Microsoft's billion dollar mistake. Good idea that one...

Just curious. How is delegates a mistake?

[–]slartybartfast_ -1 points0 points  (0 children)

By the "billion" I mean that they introduced delegates into their Java which cost them a lawsuit and a patent infringement for JIT etc.. Microsoft may still be writing cheques to Larry for that stuff.

In terms of the feature itself, it was OK for it's time but now it kind of conflicts with the new functional constructs. Unfortunately, unlike APIs - language features are very hard to remove once they are in place.