News for hackers. Stuff that matters.
Re:Span<T> in C# by pjmlp on Sunday November 19, 2017 @04:04AM (#15732985)
That is just temporary glitch, until Java gets value types.

The biggest problem is that no-one wants to do a Python3 on the pile of Java code written in the last 20 years, so of course that have been doing baby steps, which are starting to see the light now post-Java 9.

And they will come, because Java is feeling the pressure on Fintech from companies that want to move away from C++, but still feel some pain, ergo Pony.

Java also needs such features for Project Metropolis, the JVM can only be successfully rewritten in Java, if there are no performance regressions.

Also, IBM and Azul JVMs do have language extensions for value types.

Re:Span<T> in C# by int_19h on Sunday November 19, 2017 @04:27AM (#15733049)
Well, it's been a temporary glitch for, what, 13 years now?

Yes, Java will fix this eventually (although, doing this for generic collections would also require reified generics, no?). But, of course, C# will also advance further in that time.

The general problem, I think, is that the process that Java uses for language evolution is deliberately slower than C#, so C# can bring new features faster. There's a trade-off there in that there's also less breakage, and acquired Java skills take longer to become obsolete. Which probably has something to do with why Java is still very prominent in the enterprise, and in industries like banking.

Re:Span<T> in C# by pjmlp on Sunday November 19, 2017 @06:09AM (#15733383)
Well, C# did not switch hands among a company acquisition, whose owner lost sight how to move forward the language.

Even C# does move slowly, these lovely C# 7.2 features that I can already use on my private projects, will take years to be allowed on my typical set of customers, the enterprise.

I just helped one transition to .NET 4.6.1.

Likewise another one just moved into Java 8 this year.

Worse is the Android situation, regardless of the features Java might get, even feature parity with C#, Google will cherry pick only the ones they care about.

Re:Span<T> in C# by int_19h on Sunday November 19, 2017 @07:47PM (#15736946)
The nice thing about many new C# features is that they are still supported on older runtimes. So you can ship stuff that runs against 4.5 or even 4.0, while using e.g. the new property syntax, or inline out, or even pattern matching (for your own classes). For something like tuples that needs library support, they now provide the requisite bits as NuGet packages - if I remember correctly, the one for tuples is also 4.0 up.
Re:Span<T> in C# by pjmlp on Monday November 20, 2017 @12:42AM (#15738051)
Yeah, but that is a side effect of the CLR original target, as a means to support any language, including C like ones.

Which is ironic that nowadays JVM gets more languages, with compiler backends pretending to be Java like, while .NET SDK 1.0 even had multiples examples of programming languages.