Date: Mon, 17 Apr 2006 23:06:37 +0200 From: Benjamin Lutz <benlutz@datacomm.ch> To: freebsd-chat@freebsd.org Subject: Re: Why is not more FreeBSD software written in C++? Message-ID: <200604172306.44838.benlutz@datacomm.ch> In-Reply-To: <200604171047.30753.jhb@freebsd.org> References: <200604151313.32519.benlutz@datacomm.ch> <200604161650.11428.benlutz@datacomm.ch> <200604171047.30753.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart9974750.ZRnEKKlOy4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 17 April 2006 16:47, John Baldwin wrote: > To be honest, if you want a "safer" language, I'd prefer going from C to > C# or Java. C++'s syntax is, quite frankly, clunky in several places. I perceive the syntax of C++, C# and Java to be very similar. The differenc= es=20 are minor. What about C++ is clunky that isn't also clunky in C# and Java?= =20 One thing that comes to mind is that you can't use >> with nested templates= ,=20 but then that's not one of the most common things a C++ programmer writes=20 anyway. The things that bug me about C++ are mostly semantic in nature (no= =20 uniform access or read-only vars, requiring you to manually create accessor= =20 functions for everything, for example. Or no contracts, but then none of th= e=20 mentioned languages offer that.) > At work I recently described C# generics as "C++ templates that don't > suck" for example. :) But C# templates offer little over the C++ ones (well, ok, there is one thi= ng,=20 template type specification, that's nice), but have severe limitations. Why= =20 do you like them better? > Also, many of the bugs I either have myself or run into in other people's > code come from the programmer not taking into account all of the conditio= ns > (i.e. missing an edge case in implementation or design), and those type of > bugs are not something a language is going to solve. Sure, there won't ever be a dwim language. But every mechanism that prevent= s a=20 class of bugs categorically is a step in the right direction, imo (that'd b= e=20 the direction of correctness). I'm aware that C++ isn't much of an=20 improvement over C when it comes to providing such mechanisms. However, it= =20 does make writing code more comfortable (well, if you know it, and like OOP= ),=20 and it is actually shipped with the FreeBSD base system. Cheers Benjamin --nextPart9974750.ZRnEKKlOy4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBERANkgShs4qbRdeQRAj65AJ9M9MoD/vsHUPbQNrnHCN0p5X2++wCfXk9c FniOF3I61jWmEXP96gRBqmI= =w7Y4 -----END PGP SIGNATURE----- --nextPart9974750.ZRnEKKlOy4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604172306.44838.benlutz>