Yes, C++ will let you make mistakes. It's not your nanny, it's a programming tool for... GASP ...programmers...
Let's see if we can get ACTOR resurrected...
Yes, C++ will let you make mistakes. It's not your nanny, it's a programming tool for... GASP ...programmers...
Let's see if we can get ACTOR resurrected...
Even though he wasn't ragging on C++ as a general-purpose programming language, it would be nice if the programming community could have honest conversations about its shortcomings without resorting to defensive, ad-hominem attacks.
Personally I always use -Wextra (the relevant flag for clang) when working on my own code.
The problem presented in the article is not well thought out and cannot be achieved with these instructions:
Write down your name.
Make a pile of pennies with as many pennies as there are letters in your name.
Keep doing this:
Write down an 'X'
Remove one of the pennies
as long as the number of pennies is less than the number of letters in your name.
So, outside of being a mind-reader how is a C++ compiler supposed to correct _your_ thinking?int foo = -1 unsigned int bar = 1
then "foo > bar" evaluates true. And it shouldn't, because that makes no sense. Languages should not violate the Principle of Least Surprise unless there's a really good reason.
I say this because it's a lot less dismissive of the troubles of the programmer to be. I remember being new not so long ago, and being frustrated immensely by the dismissals of experienced C++ programmers who feel that programming is inherently all about knowing and dealing with the hard edges of the machine, and much less about the rather beautiful theoretical side most people would call Computer Science. And I feel that's pretty much wrong; that programming is a balance between wrangling the machine and building elegant, beautiful logical constructions.
Covering both sides separately is important, and builds a strong programmer. Teaching only one side, or not acknowledging the differences between these two very separate skills/processes confuses aspiring programmers tremendously, and turns them away from the tremendous power that can be had in languages like C++.
Yes, assembly will let you make mistakes. It's not your nanny, it's a programming tool for... GASP ...programmers...
So, therefore, C++ is equal to or less than BaSUCK and yer a silly-nanny like yer old man.