Live data from Hacker News

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

techcrunch.com

261–270 of 341 posts

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

#261

Earlier quoted context omitted.

the Stream API is nice, but it is not extensible. I guess you have mistaken LINQ with the SQL style LINQ queryes, but it is actually a pack of feautures, the basis of all is the Extension Methods. Every LINQ query is just syntactic sugar for composed of some extension methods to IEnumerable . Without that LINQ is a bunch of extension methods giving an extensible fluent API much like the Streams API, but with true ext…

> How do you reverse a stream in java? By calling .reverse() on it, and making it iterate the other way around? > extension methods Extension methods are something that’s really really problematic, and easy to create confusion with. That said, I’d just import the functions I want to call on the stream into my local namespace with import static.

When i last used the stream api i don't remember it had a reverse functionality. Still that was an example only.

Edit: Just checked: https://docs.oracle.com/javase/8/docs/api/java/util/stream/S... no reverse().

Fyi for 1 year I have been working on a Stream API heavy app. Now working on a C# project with quite some LINQ. I know both sides to some extent...

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

#262

Earlier quoted context omitted.

This is no longer true. http://arstechnica.com/tech-policy/2016/01/android-n-switche...

It is my understanding Android simply uses the class library of OpenJDK. Android will continue to used the ART VM instead of the HotSpot VM.

True, but I personally believe this is the first step to adoption. The whole issue was around licensing..not because the Hotspot vm had something fundamentally missing (zygote and MVM notwithstanding)

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

#263
post #48

Earlier quoted context omitted.

Google have not made their own languages Dart/Go official to Android. Why would they make languages other than Java a priority now?

.NET would have had a real chance at being the android application platform if it was philosophically in the state that it is today (open sourced toolchain/compilers, open-source friendly MS, Mono/Xamarin in good shape). Moving android away from Java is going to be a big undertaking and I doubt Google will undertake such a huge project only to move away from Oracle and closer to MS. If they ever try to replace Java,…

Also, a few years ago Xamarin actually ported Android (then 2.2. IIRC) to Mono/C#, as a test for Java->C# converters, and the result was faster than Android/Java.

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

#264
post #258
post #179

Earlier quoted context omitted.

Can NSIS by now roll-back partially failed installations? That's to me the biggest gripe I have as a user of such installers – whenever something weird goes wrong you end up with a half-installed application of which you don't know how to get rid of the pieces.

You delete the directory to get rid of the pieces.

Assuming it hasn't done a bunch of other stuff yet. While Microsoft recommends that the install directory is the application bundle and programs should confine themselves to it, that's hardly what many applications are doing.

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

#265
post #149
post #111

Earlier quoted context omitted.

Java the language versus C# the language.

Same question. What advantages does C# the language have vs Java the language? Do people perceive Java as playing "catch up" with other languages? e: I only ask because I've always heard the opposite.

Well imho C# is bit more mature than Java. I am talking strictly in terms of "in-built" language features.

For example, apart from LINQ, generics in C# dont do type erasure, as in Java. I am sure there are few more. [1]

Of course, Java running on so many platforms is nothing less than a miracle but I am of opinion that C# language is more matured than Java language

[1] https://msdn.microsoft.com/en-us/library/ms836794.aspx

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

#266
post #176

Earlier quoted context omitted.

Where did you get that they compile C# to C++? I thought .NET Native was compiling to machine code, maybe with IL in between, but certainly not via another high-level language.

https://github.com/dotnet/corert/blob/master/Documentation/i...

Ah, thanks. Didn't notice that part. So it's more an option, among others, while the "normal" .NET Native toolchain directly goes the IL → machine code route via RyuJIT.

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

#267
post #58

Earlier quoted context omitted.

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#.

> Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code or greatly enhancing it. Depending on how you use it. That's why Java is a language for idiots. I'm not saying everyone who uses it or likes it is an idiot, it's a reasonable language to like. I'm saying it's designed to be usable by idiots. Can't have operator overloading, it might be abused.…

Every language is usable by idiots and some are even copied by idiots (C#). The constant security problems we face today were all created by idiots that didn't fully understand the language and the implications of what they were doing.

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

#268

Earlier quoted context omitted.

Are you replying to the proper comment? In any case, he stated that an Android C# app would be more performant than an app coded in Java without supplying any metrics to prove his point. >This is a natural consequence of having value types (structs). You can even change the bit packing and other layout properties of structs. And yet the JVM still beats the CLR in performance.

> And yet the JVM still beats the CLR in performance. On mobile memory-constrained devices? Can you share a benchmark demonstrating that?

The JVM reference inferred non mobile.

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

#269

Earlier quoted context omitted.

> It also makes writing and refactoring faster (don't have to think about the return types, just the code flow). I see what you mean, but isn't this one of the advantages of explicitly declaring types? If you refactor a method to return a different (incompatible) type, you'll have to touch all affected code parts, possibly revealing uninteded consequences of the change. Also, I think remembering that autocompletion i…

If you change the return type of a method without using var you would still have the exact same problems. That's not an actual problem. I've used var since it came out years ago and never had this autocompletion problem you talk about. You sometimes had to explicitly declare a type in foreach loops, but that had more to do with shitty legacy APIs that used abstract classes as return types. Wasn't really var's fault t…

Consider the following scenario:

You have a Toilet object with a method flush.

  var toilet = house.getToilet();
  toilet.flush();
Now you find out that updating Toilet objects is somehow expensive and decide to wrap it into a Cache. Unfortunately, Cache also has a flush method, so there will be no compile time error, but functionality is broken now.

I agree this problem would also occur when using chained calls (house.getToiled().flush()), but explicit types could cover at least some of the cases.

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

#270

Earlier quoted context omitted.

> It also makes writing and refactoring faster (don't have to think about the return types, just the code flow). I see what you mean, but isn't this one of the advantages of explicitly declaring types? If you refactor a method to return a different (incompatible) type, you'll have to touch all affected code parts, possibly revealing uninteded consequences of the change. Also, I think remembering that autocompletion i…

> If you refactor a method to return a different (incompatible) type, you'll have to touch all affected code parts, possibly revealing uninteded consequences of the change. If you can refactor your code such that you change the return type of a method such that it returns an object of a different type, which nonetheless implements all of the methods used by clients of your type that accept and return types which in t…

One single common method is enough if that's the only one used in said context.

Sure, different types shouldn't use the same method name for different functionality, but it happens. And when such a scenario happens, I imagine it will be quite nasty to debug.

Post reply on HN