|
Boost : |
Subject: Re: [boost] Boost.GSL?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2015-10-01 03:14:08
Beman Dawes <bdawes <at> acm.org> writes:
> The full talk is available at https://www.youtube.com/watch?
v=1OEu9C51K2A
>
> Herb Sutter's take the next day is also essential to understanding the
> whole picture. See https://www.youtube.com/watch?v=hEx5DNLWGgA
I finally got through the second talk. It was really... disappointing. It
felt like cheap circus for little kids. We all know that some logic
deductions can be made in a trivial cases. I did not see any adult
discussion about why they believe these examples are representative. IMO
99.999% of the real use case will not like this branch-less, loop-less
code. Real code will look more like:
void foo( int i )
{
vector<int> v{1};
int& ref = v[0];
if( i%2 )
v.push_back( 2 );
if( i%2 )
i = ref;
}
What is their local static analysis suggest us to do in this case? If code
is wrong, how should we write it in modern C++?
I do not want to discourage this effort by no means, and I really believe
we can use modern C++ to produce much better code. Yet, this talk did not
lift my spirit.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk