News for hackers. Stuff that matters.
Re:Things from Python I'd miss in Go by fulafel on Tuesday June 10, 2014 @10:14AM (#7872563)
Zero-cost abstractions come at a pretty hefty price if you pick C++. The cost is in programmer productivity & quality of resulting software. I'm sure there are some fields of academia where this is a reasonable tradeoff (if you're programming DSP algorithms running on a embedded battery powered device strapped to a dolphin, say...) but your generic number crunching job rarely calls for it.

(As an aside, zero-overhead abstractions being unique to C++ doesn't sound right to me. Then again I haven't heard the term used outside C++ circles and its meaning is nebulous, so maybe it's just a name for C++'s tradeoffs?)

Re:Things from Python I'd miss in Go by adwn on Tuesday June 10, 2014 @12:28PM (#7873517)
> Zero-cost abstractions come at a pretty hefty price if you pick C++. The cost is in programmer productivity & quality of resulting software.

I agree with you. But as with most prices, sometimes they are worth it. There are a lot of practical cases where you really want the performance (even outside scientific computing, which in itself is a pretty widely applied field).

> I'm sure there are some fields of academia where this is a reasonable tradeoff

I'm not sure where you got "academia" from; scientific computing is in no way restricted to research. Weather predictions, genome processing, and oil reserves exploration are just three of many examples for the commercial application of scientific computing.

> (if you're programming DSP algorithms running on a embedded battery powered device strapped to a dolphin, say...)

DSP applications are ubiquitous today; you'll find them, e.g., in your phone, or in your car.

> but your generic number crunching job rarely calls for it.

You're very wrong. Number crunching is the example for which you want lots of performance.

> As an aside, zero-overhead abstractions being unique to C++ doesn't sound right to me.

I didn't say they are. I said that no other language offers them to the degree that C++ does.

> so maybe it's just a name for C++'s tradeoffs?

No. It means abstractions which do not cause runtime overheads because the compiler can optimize them away.

Re:Things from Python I'd miss in Go by markrages on Tuesday June 10, 2014 @10:55AM (#7872844)
For embedded DSP, the preferred language is C (no ++). The extra complexity the ++ adds is of little or no value in small embedded systems.
Re:Things from Python I'd miss in Go by edgarbob on Tuesday June 10, 2014 @11:02AM (#7872891)
Hopefully Rust's approach to zero-overhead abstractions will alleviate a lot of the problems you run into in C++.