C++ developer choices in open source projects

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 29 07:49:18 PDT 2014


On Tue, 2014-10-28 at 21:37 -0700, Walter Bright via Digitalmars-d
wrote:
> http://www.codergears.com/Blog/?p=421
> 
> This is interesting as it relates to D's choices:
> 
> 1. No common build system ,Visual Studio, make and  CMake are the most widely used

Don't forget the far superior SCons. And also Waf, Tup,…

> D - no change.

Apart from Dub?

> 2. Namesapces not widely used

Really? Maybe I habg out with better than average C++ programmers ;-)

> D - forces use of namespaces, i.e. modules
> 
> 3. Inheritance and polymorphism are widely used
> 
> It's my impression that D uses a lot more parametric polymorphism (i.e. 
> templates) than virtual inheritance.
> 
> 4. Design Patterns not widely used
> 
> Don't know if D changes that.

Most programmers still only know of GoF patterns if they know of any,
and they are now 21 years old and nothing like as useful/relevant as
they we 20 years ago.

> 5. No common frameworks for the GUI, database access and logging needs.
> 
> Same for D, though std.experimental.logger may change that.
> 
> 6. Smart pointers not enough used
> 
> The general problem with SP is you have to proactively use them, they are not 
> the default. D's gc pointers are the default.

unique_ptr and shared_ptr are now standard and widely used with RAII so
as to ensure all heap use is properly managed. Or maybe the C++
programmers I know are not representative?
> 
> 7. STL widely used , not boost
> 
> Phobos' ranges appear to be widely used.

Boost is both great and a real problem…

> 8. Exceptions not widely used
> 
> Exceptions are embraced in D, perhaps even excessively :-)

To be fair, exceptions in C++ have termination semantics and so should
be very rarely used. Your comment implies D exceptions are more like
Java exceptions, for handling errors.
 
> 9. For many projects two or more ways used to represent a string class
> 
> D's strings are built-in to the language, which is a huge win for consistency. 
> Even modern C++ suffers from two distinct string types.

And there was me thinking std::string was standard in C++ ;-)

> 10. New created projects use more the new C++ standards
> 
> As they should.

Indeed; any C++ project not using C++14 is wrong. ;-)

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141029/200d9471/attachment.sig>


More information about the Digitalmars-d mailing list