Date: Sat, 22 Apr 2006 10:15:15 -0700 From: Don Dugger <dugger@hotlz.com> To: freebsd-chat@freebsd.org Cc: Dan Strick <strick@covad.net> Subject: Re: Why is not more FreeBSD software written in C++? Message-ID: <444A64A3.2020208@hotlz.com> In-Reply-To: <200604221603.k3MG3rmI003382@mist.nodomain> References: <200604221603.k3MG3rmI003382@mist.nodomain>
next in thread | previous in thread | raw e-mail | index | archive | help
Now that that's cleared up :-D I too do not think much of iostream, not sure I agree about strings. But "streams" have been around a lot longer then c++. I first encountered them in AIX protocol stacks. Didn't like 'em then either. Although the idea of pushing functional units down a pipe does seem interesting, however I have never found it works very well in practice, and the reason was always performance. I think the problem is in fact is a general problem the more under lying functionality you have the less performance. And I don't think that got any thing to do with the language. Having said that, some languages with perform better at some tasks then others, but remember c++ is a general purpose language and I believe can normally out perform other languages if the program is written right. If you need to you can use the c lib stuff and only use the c++ added functionality when it pays to. After all some of the c++ stuff is just better, "//" comments and passing by reference and etc. I think the reason streams was added to c++ early on was that a lot of people didn't like printf(), the found it hard to use, which I never understood. I use printf() rather then iostream and until someone comes up with a better io lib I will keep using it. I have noticed that iostreams have gone through a large number of changes over the years. But strings are another matter. For more years then I will admit to I've been using strcpy() and the other "string.h stuff and the problem of allocate, reallocating and deallocating buffers has bitten me way to many times. So when there are allocation issues I use strings. BTW in the case of file io I wrote my own library of classes and found that it wasn't that hard to get performance and good functionality, I will however admit that the scope was only files not general io. Don :-) Dan Strick wrote: >On Saturday 22 Apr 2006 08:33, Don Dugger wrote: > > >>Not that it matters a great deal but I didn't write that. >> >> >> > >Oops. > >I was confused by multiple levels of attribution and missing > characters. >I should have been more careful. :-( > >The attribution should have been to Benjamin Lutz. > >Dan >_______________________________________________ >freebsd-chat@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-chat >To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?444A64A3.2020208>