Slashdot stories can be listened to in audio form via an RSS feed, as read by our own robotic overlord.


Forgot your password?

Comment: Re:Why bother? (Score 1) 346

Compiler optimizations don't really help if your code is I/O or input-bound, which accounts for most of the code written today - so users rarely see the benefits. Occasionally you get a situation where one particular code path is CPU-bound and is hit often enough that optimizing it matters, but in that case it's usually still easier to use C++ for that particular bit, and some other high-level language for the rest.

Granted, with all the changes already in C++14, and more good stuff coming in C++17, C++ itself gets more high-level every year. Right now I'd say the problem is really more with the tooling than with the language... debugging C# or Java is still a much more comfortable experience than debugging C++. But it doesn't have to be that way.

Comment: Re:Why bother? (Score 1) 346

Promises and async is indeed a good point. I've been writing async (UI) code in C# for the past two years, and have almost forgotten what a mess it was before tasks and await.

BTW, async/await is also proposed for C++, though it is a much more generalized construct there:

VC++ has a preview of the implementation in the current betas:

Comment: Re:Why bother? (Score 1) 346

Funny thing is C# isn't where .NET is and isn't where its popularity comes from. is why .NET is popular, and unfortunately why the GP is wrong.

Shame, but I'm hoping an influx of interest now the platform is open source will move .NET more towards C#. And I hope the superiority of C# to tJPL will, ultimately, move Enterprises to the platform. Java has stagnated in large part because its real competition - that nobody wants to admit - are PHP and Visual BASIC. And, ironically given Oracle's actions against Google, Android is the only thing giving non-Enterprise developers exposure to the language and keeping it in the public eye.

A sudden popularity in C# may push Java to be more relevant, and if Java fails, we might see some interesting moves in areas that have traditionally been Java based.

Comment: Re:Revolution (Score 1) 551

by shutdown -p now (#48645553) Attached to: What Happens To Society When Robots Replace Workers?

But the rich will not recognize that until the mobs with pitchforks are breaking into their gated communities.

It only needs to happen in one place for others to recognize the urgency. Just like the communist revolution in the USSR prompted the rise of the welfare state in the West (and, with the collapse of the USSR, welfare state is also slowly evaporating).

Comment: Re:Why bother? (Score 1) 346

This is subjective. But it certainly goes beyond "remembering whether to capitalize the first character of your methods and variables", at least if we're talking about idiomatic C# vs Java.

Granted, Java is catching up with lambdas and the associated library stuff in Java 8. But it is still hampered by type erasure, and libraries haven't picked up on their use yet, while in C# the patterns that only really make sense with lambdas have been idiomatic in libraries for a few years now.

Comment: Re:Why bother? (Score 3) 346

Perf of JVM vs CLR is a complicated topic. Generally speaking, JVM (HotSpot, specifically) has an edge when it comes to optimizing code, but CLR has an edge in that some of the language semantics generate more efficient code to begin with. User-defined value types (structs) and non-type-erased generics thereof make a big difference there.

HotSpot is better at optimization because it can afford to be slower - it can interpret the bytecode for rare code paths, and only kick in the full-fledged optimizer after it figures out that something is worth optimizing. CLR doesn't have a bytecode interpreter at all, it always JIT-compiles on first call - which means that the compiler has to be fast enough, and that in turn means shedding slow but effective optimizations.

Of late, .NET Native is an interesting piece of tech that precompiles .NET apps using VC++ compiler backend. So you get all optimizations in your .NET code that C++ normally gets. Of course, it's still slower due to the more deterministic but less memory-friendly sequencing and memory model, and all the extra runtime checks, but it's still faster than JIT (and, I strongly suspect, HotSpot, though I don't think anyone has profiled them yet).

Comment: Re:Make it easier to hire people? (Score 3, Interesting) 551

by TubeSteak (#48644067) Attached to: What Happens To Society When Robots Replace Workers?

In particular, humans have done the best in countries that have automated the most.

Which countries?
What is their tax rate?
How much socialism (aka social support) is mixed into their social structure?

The "cost of automation" has been declining for centuries, and humans have been doing better and better.

This is a bit of a red herring, in that for centuries, the declining cost of automation mostly served to free up huge amounts agricultural laborers to do other work.

The issue at hand is that now automation is taking over much of the "other work."

"'Tis true, 'tis pity, and pity 'tis 'tis true." -- Poloniouius, in Willie the Shake's _Hamlet, Prince of Darkness_