Post
Topic
Board Services
Re: Looking for someone to create/modify software for this forum [1700+ BTC]
by
bitplane
on 19/03/2012, 20:00:22 UTC
So can we agree that "crap can be written in any language" and stop with the language bashing?

Basic probability says that the more lines of code there are, the greater the chance of it having a bug. As you add lines the chance of software having a bug approaches 100% and this applies to all code. Not badly written code, not code without unit tests, not code written by beginners. All code. For shipped code without unit tests and a dedicated QA team it's about 20 lines, for the best team it's about 100, for the best practices in the industry it's about 300. Does your codebase contain more than 300 lines? I don't care how good you are, even if you're Donald Knuth your code contains bugs.

Some languages are more powerful than others and the bugs are more dangerous. C++ is a powerful language where bugs have a high chance of being loose cannons.

In modern C++ one rarely uses plain pointers excepting the case of using them for the purpose of adding extra "optional" function arguments. If you don't know about them please read up on "smart pointers".

No need to patronise me. Smart pointers prevent dangling pointers, which is only one class of security problem with direct memory access. If you aren't using C++ in a way that is potentially dangerous then C++ isn't the right tool for the job.