Live data from Hacker News

Google joins .NET Foundation as Samsung brings .NET support to Tizen

techcrunch.com

101–110 of 341 posts

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#102
post #25

Earlier quoted context omitted.

Why would someone down vote an opinion that they are okay with Java? It added to the conversation. Personally I prefer C# and Swift to Java but others idea are just as valid.

An opinion without justification adds nothing.

Care to justify that opinion?

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#103

Earlier quoted context omitted.

What magic are you talking about? Various .Net frameworks have silly amounts of magic, but C# itself?

When I started going into C# from Java a bit, there were two things slightly annoying me: - Class extensions: I saw code examples online that just wouldn't work for me because the compiler told me a certain method of a built-in class wouldn't exist. After I while I found out that the author of that snippet had used class extensions and not bothered to mention. - The var keyword: While this is sometimes nice for quick…

> The var keyword: While this is sometimes nice for quick scripting or hacking in the debugger console, it opens the door for hard-to-read code.

I find type inference to be the opposite, generally, because it encourages good naming, and it reduces noise/boilerplate. It also makes writing and refactoring faster (don't have to think about the return types, just the code flow).

The only situation I can even think of where it is a problem is when you are passing something to an overloaded method. For example:

    void DoSomething(MySpecialType value);
    void DoSomething(string value);

    ////

    var result = GetData();
    DoSomething(result);
  
You can't tell which one is going to be called by just looking at that code. However:

* GetData() is probably badly named in this situation

* If DoSomething() does something very different depending on the type passed, it should have different names, not be overloaded

On top of that, this code can also have the same problem without type inference:

    DoSomething(GetData())

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#104

Earlier quoted context omitted.

What magic are you talking about? Various .Net frameworks have silly amounts of magic, but C# itself?

When I started going into C# from Java a bit, there were two things slightly annoying me: - Class extensions: I saw code examples online that just wouldn't work for me because the compiler told me a certain method of a built-in class wouldn't exist. After I while I found out that the author of that snippet had used class extensions and not bothered to mention. - The var keyword: While this is sometimes nice for quick…

The var syntax definitely doesn't lead to hard to read code. It's one of those assumptions people who haven't actually used it make.

99% of the time it's completely obvious what the variable is because you can just look at the right side of the equal sign.

Also, you can just hover over it.

As for the extension methods, they pretty much fixed that in VS 2015, it will now tell you which using statement you need to include.

Extension methods are a good solution to a specific problem.

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#105
post #42

Earlier quoted context omitted.

That would be huge win for Microsoft, presumably if Android apps are written in C# they will be easy to port or have shared libraries with windows apps.

Is that something Google wants? I don't see the advantage for them short of adding on C# devs

It's a mighty good option to have when you are negotiating with Microsoft. Imagine Google offering to Microsoft that they would adopt Microsoft development tools and technologies iff Microsoft kills Windows Phone.

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#107
post #58

Earlier quoted context omitted.

C# and java are very similar except C# has a bunch of extra features. Instead of creating anonymous classes and overriding methods you use event handlers. Plus you have linq,lambdas, operator overloading etc.

There’s also the Stream API and lambdas in Java. Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code. And with a switch to C# Google would neglect the Java ecosystem on Android, requiring us app devs to rewrite everything again. I’m not sure there’s an upside to switching to C#.

Lambda's are horrid on Java compared to C# IMO.

Class extensions can be fantastic and really enable design elements in elegant ways, any advanced feature could be argued that it reduces readability if used poorly.

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#108
post #6

Earlier quoted context omitted.

No thanks. I like Java, and esp Java 8 just fine.

In my experience, C# can be coded almost exactly like Java 8; just ignore the extra features C# has. (I don't know why you would, but it's certainly possible.) Do you have more specific complaints?

Plumtree Portal / BEA Aqualogic Interaction / Oracle WebCenter documentation is/was a perfect example of this. When I was working on it, all of their code samples had a footnote that said something like "all code examples work in Java or C# unless otherwise noted". I don't recall ever coming across a language specific example.

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#109
post #9

Now we're cooking. The technical steering groups is currently formed out of: Microsoft, Red Hat (so input from the main Linux distro), JetBrains (input from the makers of great tools for developers), Unity (one of the leading game engine makers), Samsung (one of the leading mobile device makers) and now Google. .NET should have a bright future. And hopefully this should push a few buttons over at Oracle HQ so that Ja…

Is Java currently behind C# in any capacity?

Not that a shot in the arm wouldn't be good for Oracle, but Java definitely still reigns supreme at the moment, despite Oracle's involvement.

http://www.tiobe.com/tiobe-index/

Re: Google joins .NET Foundation as Samsung brings .NET support to Tizen

#110
post #6

Earlier quoted context omitted.

No thanks. I like Java, and esp Java 8 just fine.

Not attacking you opinion at all but I'm a little shocked that someone would have this opinion, I work at a Java shop (using java 8 but I'm mostly now on the node.js side). Java 8 really doesn't have any features that are better than C#'s. Java 8 is missing some pretty major ones, like type inference, automatic getters/setters, LINQ, function passing support that's not brain dead, and a number of of things that make…

Which is why you would use Scala or Groovy.
Post reply on HN