C vs C++ - your opinion.

[OT]
SR_Ind said:
Although this is off topic (unless someone moves this to a Mono/C# thread), let me answer.

I didn't get you, what is "undersigned" standard library?
:D
I meant underdesigned.

SR_Ind said:
To be direct to the point, .NET is one of the well designed libraries. I worked on the first project way back in 2001/2002 with the beta release. In those days there was nothing on the Internet. There was no complete documentation for the beta product. We did the project with whatever content there was in MSDN and .... intellisense of Visual Studio. In my opinion this is only possible when the library you are working with is a well structured, intuitive, with a sensible nomenclature.

To anybody coming from direct C background the library would seem weird. Similar complain was from Visual Basic programmers. It is due to lack of familiarity and experience with large scale object oriented development.

Talking of ad-hoc hacks, to my experience two libraries take the honour, GTK and Java.
What I experienced there was a mess of exceptions, inconsistencies and hacks. Frankly, I am happy to have forgotten most of them. But 1 horror will probably stay with me forever.
Equals / operator==.
Both are nice and have well defined semantics.
The only problem is that the standard library doesn't adhere to the definitions. For example strings. Or arrays. The latter is really outrageous. They didn't meet deadlines to implement comparison, so they made .equals work like ==. By .NET 3.5 (which I couldn't use BTW) they thought that comparing arrays might have some use. How did they fix it? Obviously, not by making arrays follow the standards as that would break compatibility. They added an external function.

BTW, I don't know GTK at all and barely touched Java.[/OT]
 
^^

Array comparison? One use case I remember was in an in-house GIS application, comparing line objects. Though I know people doing this with ordinary data sets as well.
 
valsorym said:
Hi all,
What do you think, what language is best used to create low-level programs (for example: drivers, kernel to new operation system, etc)?

Yes, C++ it is Object Oriented Language - it facilitates the work of the programmer. But let's not look at the development of custom software products (for example: browsers, editors, calculators, accounting software etc.).

If C++ is so good, why the FreeBSD base written in C?
1. For that would not overwrite the operating system, developers continue to use C.
2. С for such problems is better than C++.
3. Or, and - your opinion!


Thanks. :stud

I'm not much of a programmer as far as systems and hardware, but here is my opinion.

C++ and C have become quite close in the application development side, as an example you can easily use most libraries designed for C in C++ apps (like libsdl for multimedia)

C has a more strict coding style to it, its not as dynamic as C++ in the way you can write things and that makes it alot closer to the computer's machine language you are programming on in that you have to keep the program simple enough for both you and the machine to understand.

C++ has built in objects and other such things that are great tools but can easily overcomplicate things if you don't have great coding style and habits.

To sum up, I believe C is still used for its simplicity and the things that it is easier to NOT be able to do with it. I believe most system developers look for the most straightforward and simplest solution to get their code done, and most system level code doesn't need anything too much more advanced than what C has, plus most of the available code is already in C and it would be alot of porting. C++ it is too easy to get lost in the abstracts of things like objects and templates.

It is like using every blade on a swiss army knife to put peanut butter on bread (C++), instead of just grabbing a butter knife and using that (C)

Just my opinions, and like I said, I don't do much system level stuff.
 
Back
Top