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 533743
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: C++
by kwan_e on Tue 4th Sep 2012 01:49 UTC 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

RE[3]: C++
by satsujinka on Tue 4th Sep 2012 07:11 in reply to "RE[2]: C++"
satsujinka Member since:
2010-03-11

Except the STL is almost entirely duplicate functionality. list and map are the only new containers. Everything else is either a duplicate or a minor change away from being a duplicate.

Vectors don't really make life easier. And RAII is only useful if you're doing OO.

The C I/O functions work at least as well as C++'s, even on objects.

Honestly, I think Qt is crazy, but most GUI programming is.

Reply Parent Score: 0

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

Except the STL is almost entirely duplicate functionality. list and map are the only new containers. Everything else is either a duplicate or a minor change away from being a duplicate.


Set, queue, deque, unordered (hash), heap. If by "minor change" you mean lack of manual memory management, then yeah. But I would call that an improvement.

Bunch of standard algorithms. Smart pointers. Concurrency.

Let's not forget that C++ allows things like Boost to happen.

Vectors don't really make life easier. And RAII is only useful if you're doing OO.


So you like having to explicitly allocate and deallocate memory? Even with C99 variable length arrays, you can't easily push or pop or insert or delete items or resize without the possibility of introducing bugs. Then you also have to manually keep track of the length of the array in case you don't use the whole thing.

The C I/O functions work at least as well as C++'s, even on objects.


And?

Honestly, I think Qt is crazy, but most GUI programming is.


Then in no way can you say anything about C++. C++ is designed for complicated things, like GUI programming for example.

Reply Parent Score: 4

RE[3]: C++
by JAlexoid on Tue 4th Sep 2012 13:30 in reply to "RE[2]: C++"
JAlexoid Member since:
2009-05-19

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.

Lets agree on one thing - proficient and intelligent people will use the best available tools and abuse their strengths. This is language independent.
A proficient and intelligent person will take a turd and make diamonds out of the carbon it it.

Problem with C++ is that it's so wide that finding a group of people that think the same way about C++ is virtually impossible.

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.

He said allows, it doesn't mean that everyone is doing crazy things. Though C++ developers tend to veer off quite often into crazy stuff.

Reply Parent Score: 2

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

Problem with C++ is that it's so wide that finding a group of people that think the same way about C++ is virtually impossible.


I fail to see why this is a problem. The multi-style nature of C++ is better than trying to cram every problem into an OO or functional or message passing style.

Conversely, I think you highlighted the best thing about C++ and is certainly one of the design goals Stroustrup had in mind. It allows the programmers to choose the style that fits a problem best.

I would hope that a person using C++ to write a webserver would have a completely different idea of how to use it to a person who uses C++ to write a game, or a realtime controller, or a stock exchange, or a highly parallel physics simulator, or a compiler.

Reply Parent Score: 3