To C++ or not to C++
Cesar Mello
cmello at gmail.com
Fri Jun 24 16:14:47 GMT 2005
Go for C++ and keep your C APIs hidden.
Automatic resource acquisition, the standard template library and exception
handling work great and will allow you to write very clean code.
If you haven't done this yet, buy a copy of "The C++ Programming Language"
by Bjarne Stroustrup and "C++ Coding Standards" by Herb Sutter, that changed
my life drastically. hehe
In the other hand, if you have seen MFC, forget everything you know as C++
and go buy those books.
[]
Mello
2005/6/24, Erich Dollansky <oceanare at pacific.net.sg>:
>
> Hi,
>
> Ryan Sommers wrote:
> >
> > Anyway, without getting into too much detail. Anyone had to make this
> > choice on a project? What were your thoughts in retrospect? What would
> you
> > have done different, what would stay the same...
> >
> No matter what kind of project I did after the C++ hype was over it was
> in C++ with as little as object orientation as possible just to make use
> of the advantages compilers offer for C++.
>
> You need one or more interfaces to plain C libraries.
>
> You should see pretty fast where you better switch to C++ as long as you
> keep this clear line to C libraries always intact.
>
> You also should draw a clear line if your programs will be called from
> others. Draw the same clear line between C and C++ to avoid confusion
> and stick with plain C as much as possible.
>
> Never forget, many of the object orientated principles also work with
> plain C.
>
> Erich
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
More information about the freebsd-hackers
mailing list