C++ developer choices in open source projects

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 30 13:18:46 PDT 2014


Am 30.10.2014 um 21:04 schrieb H. S. Teoh via Digitalmars-d:
> On Thu, Oct 30, 2014 at 03:52:51PM +0000, Atila Neves via Digitalmars-d
> wrote: [...]
>>> CERN remains at the centre of so much good software development.
>>> Which is why they use Python.
>>
>> Wait, what? Good software development? At CERN?? Really??? As a friend
>> of mine one put it:
>>
>> "At CERN, 10% of people writing code know what they're doing, 45%
>> don't know what they're doing but are aware of it, and 45% don't know
>> what they're doing but think they do because software development is
>> 'so much easier than Physics'".
>>
>> I've seen recently (as in weeks ago) written Python code from ATLAS.
>> It's so atrocious it doesn't even look like Python. Most people I know
>> still working at CERN don't even know what C++11 is, much less use it.
> [...]
>
> It's probably a good thing they don't know what C++11 is, otherwise they
> might start writing even more horrendous code using operator""(). I
> suppose I've been a frog in the well, but it was only yesterday when I
> discovered that C++11 allows user-defined literals via operator""().
> Skimming over the docs for that today, I couldn't help but shake my head
> at just how wrong the whole conception of it is. It's just *asking* to
> be abused for writing inscrutable, unreadable, unmaintainable code. I
> honestly have trouble imagining any sane use case for it apart from
> submitting obfuscated code contest entries. But hey, what's one more
> nail in a coffin already crawling with monstrosities like
> Boost.Xpressive?
>

That was extended in C++14, for example:

#include <string>

int main()
{
     using namespace std::string_literals;

     auto s1 = "Hello\0\0World"s;
}

// s1 == std::string

There a few other pre-defined literals.



More information about the Digitalmars-d mailing list