lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] solaris compile errors, lzip, and plzip: error: stdint.h


From: Ersek, Laszlo
Subject: Re: [Lzip-bug] solaris compile errors, lzip, and plzip: error: stdint.h: No such file or directory
Date: Thu, 31 Dec 2009 21:22:32 +0100 (CET)

On Thu, 31 Dec 2009, Antonio Diaz Diaz wrote:

rupert THURNER wrote:

why did you choose to implement it in c++ btw?

Because "I never saw a project for which C was better than C++ for any reason but the lack of a good C++ compiler." (Bjarne Stroustrup).

The question for me is, why so many people still prefer plain C?

I can tell you only about my personal reasons.

a) "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off" -- Bjarne Stroustrup [0].

b) For the size and caliber of my hobby project, C is better. C++ is much more complex, it'd require much more effort on my part directed towards the language itself. The greatly increased expressiveness of C++ is not necessary for this kind of project of mine. For example, I'd have to obsess about exceptions *in addition to* checking each and every syscall and libc return value. (Or add/use wrappers that convert such syscalls into exception-throwing methods.)

c) C *still* has much better portability. Both in the wild, and also when looking at standards. As discussed before, none of SUSv1 to SUSv4 say anything about C++. Some of my stuff builds on OpenVMS with the platform compiler (not gcc). Case in point: long long / stdint.h / inttypes.h. None of those are standard C++ until C++0X comes out. (Oh wait, that's C++1X in a few hours, at least in +0100 :))

If you're interested in a view that may be a bit less balanced, I recommend the C++ FQA (not a typo) by Yossi Kreinin [1].

Cheers,
lacos

[0] http://www2.research.att.com/~bs/bs_faq.html#really-say-that
[1] http://yosefk.com/c++fqa/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]