3 ms·
I think this comment sums it pretty nicely: ---> "So, to answer your question about how many wizards C++ has ruined, I can argue that I never bothered to go fu
by greyman 18y ago
I think this comment sums it pretty nicely:
---> "So, to answer your question about how many wizards C++ has ruined, I can argue that I never bothered to go further in programming due to feeling utterly lost with C++ and Perl." ;-))
However, one comment is worth discussion: "There is no reason to use C++ for new projects."
Do you agree with this? What is a better choice then for developing standalone apps or libraries where speed is critical? It's funny to watch how some people bash c++, and then, when we need to develop some critical app, like javascript engine, suddenly the choice is again C++. ;-)
- time_management 18y agoOCaml is quick to write and produces executables with great performance.
- greyman 18y agoOk, but if you would be a project manager responsible for developing and delivering software product, would you choose non-mainstream language for the project? OCaml might be better in academic sense as the language itself, but now I talk about commercial product...so you would need to take all factors of software development into consideration - like how you will find future developers if you expand, what the support will be, etc. etc.
- jrockway 18y agoAdding a bunch of "what ifs" to justify your choice of language is not a good argument technique. "What if your manager is paid by Sun to only advocate Java?" There's no way to argue that, but it doesn't matter, because it's irrelevant. Pick the langauge you want to use.
- greyman 18y ago>> Pick the langauge you want to use. I can't, because I am just one worker and the language is choosen by the top product manager. That's not a complaint, my point was that you usually can not choose a language you want to use in professional setting. You can do so for your hobby project.
- jrockway 18y agoLeave and start a competing company that Does Things Better because you spend your time solving problems, not debugging pointers. :)
- ajross 18y agoWhat's wrong with C? Essentially all the speed-critical code on your system (think: the kernel, stuff like openssl, libpng/libjpg, audio & video codecs, MySQL, PostgreSQL, ruby, perl, python, php, apache, nginx, memcached, ...) is written in C, and it works great. There's a strange disease among modern application programmers where they seem not to be able to "see C" even when it's driving the very engines of their success. If you just look a tiny bit more deeply, you'll discover that it's not nearly as hard as you think it is.
- huhtenberg 18y ago> What's wrong with C? Mostly ignorance of the rant authors :) In fact, one way to view C++ is as a beefed up C. Specifically a moderate use of the following simplifies life quite a bit and retains almost all benefits of C - * templates instead of macros * pure classes for the callbacks instead of function pointers with void pointer contexts * standard inline functions * STL containers (not perfect from memory utilization and perspective, but typically are ok) Exceptions can also come handy, but these require a lot of moderation if used in a fastpath code.
- jrockway 18y agoWhat's wrong with C? Essentially all the speed-critical code on your system (think: the kernel, stuff like openssl, libpng/libjpg, audio & video codecs, MySQL, PostgreSQL, ruby, perl, python, php, apache, nginx, memcached, ...) is written in C, and it works great. Everything you've mentioned has crashed on me from time to time due to memory allocation errors. C is not a great langauge. It is assembly langauge with sugary syntax for loops, and a preprocessor that whines if you try to add a double and an integer. The advantage is speed. The disadvantage is that programs written in C are only correct due to luck. Oh, and the reason all of the above are written in C is because there is a common misconception that you have to write "system software" in C. You don't but people think you do. So they do.
- ajross 18y agoI'm not following. The discussion is about C++, which shares the same heap management as C, so I don't see what you are trying to say here. And I'll be frank: the hubris in your discounting the programming skills and choices of all of those working, mature, robust and very successful projects is just absolutely stunning. Have you ever delivered anything of comparable quality? Until you have, please don't condescend to tell Guido or Linus or Larry how to write their code. I'll submit that these projects are written in C because their rather talented authors see something in that environment that you don't. And that the fact that you don't see value in an environment that is undeniably producing valuable software says more about you than it does about them. Seriously dude, you gotta check that attitude.