Re: C++

Tom Bachmann <[email protected]> Wed, 23 Sep 2009 18:45:49 +0200
Newsgroups gmane.os.hurd.l4
Message-ID <[email protected]>
Bas Wijnen wrote:
>> Linus' argument is that for the kind of low-level code where C is
>> useful, C++ doesn't offer any advantages; only problems.
> 
> I thought this as well, but I have found that using only a few features
> (in particular organizing code in classes with member functions, instead
> of creating interfaces which pass their object as an explicit first
> argument) will really make the result a lot more readable.  Of course
> using C++ doesn't give any problems at all, as long as you use it
> properly.  Unless you consider "I'm unable to use 'new' as an identifier
> name" a problem.

I strongly side with bas here. Even if you hate so many things about C++ 
(which I'm not going to argue about), the syntactic sugar for non-fancy 
OOP (i.e. class and method structure, single inheritance) is a 
sufficient reason to use C++ IMHO.

Apart from that you can do wonderful things with templates, but … lets 
not go into this.

Thanks,
Tom