Linked by Thom Holwerda on Mon 3rd Sep 2012 20:46 UTC, submitted by MOS6510
General Development I like this one: "By definition, a program is an entity that is run by the computer. It talks directly to the CPU and the OS. Code that does not talk directly to the CPU and the OS, but is instead run by some other program that does talk directly to the CPU and the OS, is not a program; it's a script." Here's the other eleven.
Thread beginning with comment 533735
To read all comments associated with this story, please click here.
C++
by kwan_e on Tue 4th Sep 2012 00:46 UTC
kwan_e
Member since:
2007-02-18

9. C (or C++) should be the first programming language (+24/-5) by hansen j

The first language should NOT be the easy one, it should be one that sets up the student's mind and prepare it for serious computer science.
C is perfect for that, it forces students to think about memory and all the low level stuff, and at the same time they can learn how to structure their code (it has functions!)


As a C++ apologist, I strongly disagree. I didn't start out on C/C++ and I sure as hell bet that all C/C++ proponents started out on simpler languages, even if they refuse to remember or acknowledge the first time they dabbled.

I started out on BASIC, Q and Casio, and through it learned how to structure complex programs even if the language doesn't seemingly allow it. Then I was forced to learn Pascal during high school because the teacher didn't know C. Of course, also learnt a bit of javascript along the way since making dynamic webpages were the thing to do.

By this idiot's logic, people should start with assembler. Assembler for modern architectures have a lot of structured programming extensions too. But pedagogy is not the same as bragging rights. The real issue with pedagogy in any language, programming or human, is how to express ideas succintly and concisely.

C++ has the added advantage that it really sucks ;) thus the students will understand why people had to come up with Java and C#.


I admit that it was learning Java at university (course standard, if not requirement) and then Python (self taught) that I understood many important programming and design principles. But those principles were what drew me BACK to C++. Once you read the stuff by Stroustrup and Sutter, they open your eyes to what C++'s proper usage is and how to choose which features not to use for which problems.

I think all the people who hate C++ are simply reacting out of fear. Early in their experience, they came across a problem they couldn't fix right away. Rather than facing their fears, they just reacted and cower for safety with garbage collection and inheritance and factories up the yin-yang.

In my experience neither Java or C# solves any problems in C++. They just have better IDEs and graphical debuggers, but that's about it.

Reply Score: 3

RE: C++
by satsujinka on Tue 4th Sep 2012 01:13 in reply to "C++"
satsujinka Member since:
2010-03-11

I'm a C proponent who started in C++...

Personally, my (biggest) issue with C++ is that it's simply too large of a language. If you get 10 people who say they know C++ chances are good that the only overlap is going to be the subset of C++ that is C.

C++ also reinvents a bunch of things from C (such as I/O) and it's debatable whether it actually improved them.

tl;dr. C++'s flexibility is both its strength and its weakness. It allows you to do all sorts of crazy things, but at the end of the day they're still crazy.

Reply Parent Score: 5

RE[2]: C++
by kwan_e on Tue 4th Sep 2012 01:49 in reply to "RE: C++"
kwan_e Member since:
2007-02-18

Personally, my (biggest) issue with C++ is that it's simply too large of a language. If you get 10 people who say they know C++ chances are good that the only overlap is going to be the subset of C++ that is C.


Yes, but the people who are really proficient with C++ will use the STL, which has no overlap with C, because C simply does not have the facility.

The biggest issue with C++ are people who come from it from the C perspective and don't use the language features that promote safety. The easiest thing, first of all, is to use vectors and strings rather than arrays. The next easiest is to use RAII rather than dynamic allocation.

C++ also reinvents a bunch of things from C (such as I/O) and it's debatable whether it actually improved them.


I wouldn't call it reinvention. They just OO'd some of the tedious bits.

tl;dr. C++'s flexibility is both its strength and its weakness. It allows you to do all sorts of crazy things, but at the end of the day they're still crazy.


I haven't had to do a crazy thing in C++ at all. Have a look at Qt. Aside from the MOC (which translates to standard C++ anyway), there is nothing crazy with Qt.

Reply Parent Score: 5