On Fri, 2010-08-20 at 07:58 +1200, Ian Collins wrote:
> On 08/20/10 07:48 AM, Garrett D'Amore wrote:
> > On Thu, 2010-08-19 at 20:14 +0100, Daniel Taylor wrote:
> >
> >> On 19 Aug 2010, at 19:42, Garrett D'Amore wrote:
> >>
> >> Out of interest, what language do you recommend?
> >>
> > Depends on the job -- I'm a huge fan of choosing the right tool for the
> > job. I just think C++ tries to be jack of all trades and winds up being
> > master of none.
> >
> >
> Drifting slightly back on topic, a lot of the ZFS code (and even more
> driver code) I've looked at would be cleaner in C++. As long as a
> library has a C linkage public interface, there aren't any compatibility
> issues. The rest is FUD.
There is no common C++ ABI. So you get into compatibility concerns
between code built with different compilers (like Studio vs. g++).
Fail.
There are many many things to dislike about C++ -- you *can* write good
clean code in C++, but almost none of the C++ code I've seen fits that
description.
The various side effects, and unexpected memory explosion that occurs
with the "favored" C++ constructs tends to make C++ completely
unsuitable for use in a kernel.
I still have the scars from when Linus tried to experiment with a Linux
kernel in C++. :-) The effort was *very* short lived. Granted C++ has
changed a lot since then, but I think the ways it has changed make it
even more unsuitable for kernel/embedded work.
- Garrett
_______________________________________________
zfs-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss