October 30, 2014
>> The only two workplaces I was allowed to use C++ properly was at CERN and at a startup on a C#/C integration project done via Managed C++.

Well, at CERN, "allowed" mostly because nearly everybody writes code for themselves only and people do whatever they want to do. Never mind that there's no common CERN-wise codebase that isn't called ROOT.

>
> 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.

Atila

October 30, 2014
Am 30.10.2014 um 16:52 schrieb Atila Neves:
>>> The only two workplaces I was allowed to use C++ properly was at CERN
>>> and at a startup on a C#/C integration project done via Managed C++.
>
> Well, at CERN, "allowed" mostly because nearly everybody writes code for
> themselves only and people do whatever they want to do. Never mind that
> there's no common CERN-wise codebase that isn't called ROOT.

Well my workgroup at DAQ Dataflow cared for C++ quality, but it was not the same everywhere.

That is why one of our projects was a C++ stress tester for parallel algorithms.

Still, the quality of the code there was way better that any C or C++ code that I have seen in the wild in the typical corporations, specially codebases that suffered the magic offshore wand.

--
Paulo
October 30, 2014
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?

D had it right by moving all these user-defined literals into strings that are parsed at compile-time. Much more powerful than the crippled stuff operator""() can accept, and far less dangerous and lightyears more maintainable. Sighhh... D has ruined my life, I just can't go back to C++ anymore...


T

-- 
Don't throw out the baby with the bathwater. Use your hands...
October 30, 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.

October 30, 2014
On 10/30/2014 1:04 PM, H. S. Teoh via Digitalmars-d wrote:
> D has ruined my life, I just can't go back to C++ anymore...

Ehhhxcellleeeennnntt!


http://www.gocurrycracker.com/wp-content/uploads/2014/07/cm-23138-050624abe3a9e6.jpeg
October 31, 2014
> 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?
>

Yeah, who cares about language extensibility or useful features. These all beg to be abused. Let's all use Go instead.
October 31, 2014
On Thursday, 30 October 2014 at 20:06:30 UTC, H. S. Teoh via Digitalmars-d wrote:
> D had it right by moving all these user-defined literals into strings
> that are parsed at compile-time. Much more powerful than the crippled
> stuff operator""() can accept, and far less dangerous and lightyears
> more maintainable.

I believe there are examples of system software going wrong because one library used SI units and another one did not. So being able to typecast doubles into something more restricted is useful:

3.0_miles vs 3.0_km

Sure you could have done it this way instead:

miles(3.0) vs km(3.0)

But people don't, so providing literals is a good addition for C++.

(And no, string processing at compile time is not a good idea! It suffers from the same problems as macros.)
October 31, 2014
> 3.0_miles vs 3.0_km
>
> Sure you could have done it this way instead:
>
> miles(3.0) vs km(3.0)
>
> But people don't, so providing literals is a good addition for C++.
>
> (And no, string processing at compile time is not a good idea! It suffers from the same problems as macros.)

 UDL is a nice feature yah
1 2 3 4
Next ›   Last »