Ayao "Alqualos" Kuroyuki (ayao) wrote,
Ayao "Alqualos" Kuroyuki
ayao

C vs C++ vs...

They say that C is not suited well for high-level development. They say that C++ is not portable. They say that both of them have much trouble managing memory. They say that for higher-level development higher-level tools are needed.

I shall tell thee what. They are right. It is true that manual memory management in C and C++ giveth (1) a lot of trouble. It is true that higher-level tools and languages are needed. For example, it would be ridiculous to use C++ for pure text filtering, because it is a job for Perl.

But dare not thou ever say (2) that memory management troubles and other low-level stuff is something inherent to C and C++ and the only cure is to run away from it to higher-level stuff. Because, thou know, there are such things as "libraries". And they can handle it all for thee, really!

For C++, use QString in Qt and forget about memory management for strings and about encodings as well. Use shared classes and forget about troubles with expensive copying or duplicate pointers in shallow copies. For C, I believe GLib provideth the same set of features.

And for portability, just use the most basic things (e. g. use namespaces not!) and thou shalt find that C is the most portable language and C++ is probably the second one. Thou only needest to use portable libraries as well, like Qt and GnuWin32 stuff. In fact, thou canst easily reduce codebase size by ten times using these tools.

For those who think Java is the most portable language: know you not that Java is implemented partially in C++? Not even C! So how the hell can it be more portable?! We are not talking about exotic platforms like cellphones, okay?

--
(1) Now where can I learn more of this nice archaic English grammar? That is the question. These are nice, but are definitely not sufficient:
http://dan.tobias.name/frivolity/archaic-grammar.html
http://members.shaw.ca/hai-etlik/archaic_english.html
Or is reading Shakespeare and playing Thief the only way?
(2) Is it even half-correct? ^_^
Tags: devel, it
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments