5 ms·
>The performance gap is closing, thanks in particular to projects like cython that let you write python code that gets converted over and compiled as c++ that's
by heretohelp 14y ago
>The performance gap is closing, thanks in particular to projects like cython that let you write python code that gets converted over and compiled as c++ that's often more performant than the c++ code that devs might write themselves.
Well it's obvious you haven't done any systems programming.
>In general, the cost of hardware continues to drop while the cost of developers goes up. C takes longer to write than eg Python--I don't care who you are, it does. And if you're the god programmer of C, you probably cost a lot.
That's not what experiments have borne out, time-to-develop generally has a lot more to do with proficiency in the language of choice and in the problem domain than the language itself. I will say, however, that it is generally slower to write things in C, but not so drastically that it merits abandonment.
>So what would be the benefit of c for your boss really?
A solution that would reliably fit within the real-time and maintainability requirements of the problem being solved, unlike a throughput-focused GC'd language like C#.
- MartinCron 14y agoWell it's obvious you haven't done any systems programming While it may be true in this case, this is the sort of insulting and dismissive argument that I don't like to see here.
- huhtenberg 14y agoI would take GP's comment over someone preaching on a subject that he has no direct experience with. Latter is far more damaging to the discussion. The insulting tone is well justified. Having done my share of kernel development I can assure you that anyone who brings up a topic of rewriting Linux kernel in (even) C++ gets laughed out of the room. When someone starts suggesting that there are plausible alternatives to C for kernel development, it is indeed a clear indication of no prior experience with the subject matter.
- MartinCron 14y agoThe insulting tone is well justified. No! No! A thousand times No! You can make the exact same point in a way that doesn't smell of the condescending dick-waving and "laughing people out of the room" that debases the level of discourse. I think that HN can and should be a more civil community than Linux kernel programmers. Here, let me take a stab at it: "In my experience with systems and kernel development, there are some scenarios where working with a higher level language than C simply isn't possible. This sure looks like one of those scenarios to me. If the manager in this example is mandating that it be written in C, it could be that the manager knows this from painful experience."
- heretohelp 14y agoI don't tell my lawyer, my accountant, or my doctor how to do their job. I'll get a second opinion where prudent, but other than that, I don't assume I know more than somebody who's spent a good chunk of their life specializing into that field. Extend the same professional courtesy to your fellow programmers who specialized in a different field than you. Get a second opinion if you like. But stop spreading your ignorance. I have about as much patience for mollycoddling your ego as a doctor would for Jenny McCarthy telling people how dangerous and pointless vaccines are.
- MartinCron 14y agoI totally agree with that. I respect people who know more than I do and I don't tell any specialist how to do their job. But I sure as hell don't like it if a doctor or lawyer or accountant rolls their eyes at me and speaks to me in a dismissive or condescending tone because I'm trying to have an informed opinion even though I don't have the same degree of expertise that they have. Here's an example: Me: "I've done some research and I think I should get a Roth IRA..." Accountant A: "Roth? Seriously? Sigh... You obviously don't know a damn thing about tax planning. Good thing I'm here to save your sorry ass. You need a traditional IRA" -or- Accountant B: "Actually, in this case, a traditional IRA would make a lot more sense than a Roth IRA. It's a common misunderstanding." Technically, they are both on the same page, but tonally, the difference is huge. Our industry has too many people who act like Accountant A.
- huhtenberg 14y agoYou are missing the point. Condescending dick-waving is there to discourage original poster from making half-assed assertive comments in the future. I understand that you don't like it, but it is the most efficient way to carry the point across. > Here, let me take a stab at it: Nope. Wishy-washy, excuse me this, excuse me that, I'm pretty certain to a degree that I might be right if you don't mind me saying. Not discouraging enough. If you want another justification for the tone, let me tell you that I would've not hesitate to say the exact same thing in person, which is the criteria for wording HN comments as per pg's original guidelines.
- dave_sullivan 14y agoSo, a couple things. 1) The original question was how to convince his boss that C is a bad choice. My answer is a good way to do it. 2) Re: my direct experience... If you're talking about writing C, that's not true. But it has been a while because, frankly, I'd rather not torture myself. If you're talking about embedded programming, you're right, I haven't touched it. If you're talking about applications where performance is very important, I've been dealing with quite a bit of HPC type stuff over the last year or so. In general, the hardcore C/C++/Fortran guys are becoming less useful, for reasons I stated in my OP. Notice I'm not saying "useless", I'm saying "less useful". There are absolutely applications in which this just isn't possible, so use what works. But applications where C is your only choice are becoming rarer and rarer. And while we're here, where exactly did I say that the linux kernel should be rewritten in some other language? I didn't. So why would you suggest that I did? You're certainly welcome to disagree, but if you think that that warrants an insulting tone, it may just be because you're an asshole. It wouldn't be an internet first.
- dave_sullivan 14y agoHaha, ok... Specifically what experiments have shown that people can write in C faster than python? You even admit yourself that it "generally" takes longer. I think it just plain takes longer. Of course that's anecdotal, but if you've got something non-anecdotal, I'd love to see it. And since you've been so steeped in systems programming, would you not agree that the performance gap is shrinking? I think that's hard to argue against. And who said anything about abandonment? There's a place for C, but there are fewer than there used to be. But hey man, sorry if I offended you, maybe you're having a bad day.