B Revzin - if const expr isn't broken (was Re: My Meeting C++ Keynote video is now available)

Paul Backus snarwin at gmail.com
Thu Jan 17 18:03:07 UTC 2019


On Thursday, 17 January 2019 at 16:06:39 UTC, bpr wrote:
> On Thursday, 17 January 2019 at 01:59:29 UTC, Walter Bright 
> wrote:
>> Bartosz Milewski is a C++ programmer and a Haskell fan. He 
>> once gave a presentation at NWCPP where he wrote a few lines 
>> of Haskell code. Then, he showed the same code written using 
>> C++ template metaprogramming.
>>
>> The Haskell bits in the C++ code were highlighted in red. It 
>> was like a sea of grass with a shrubbery here and there. 
>> Interestingly, by comparing the red dots in the C++ code with 
>> the Haskell code, you could understand what the C++ was doing. 
>> Without the red highlighting, it was a hopeless wall of < > :-)
>
> Was that a pre C++11 version of C++, or a more modern one?
>
> It would be instructive to see that example with C++17 or even 
> 20 and D
> next to each other.

The presentation was given at BoostCon 2011, and is (at least 
partially) available on youtube [1]. There is also a blog post 
from 2009, "What Does Haskell Have to Do with C++?" [2] that uses 
the same format, and presumably covers the same material. The 
examples in the blog post were tested with "the GNU C++ compiler 
v. 4.4.1 with the special switch -std=c++0x", which according to 
the GCC documentation [3] includes many (but not all) features 
from C++11.

[1] https://www.youtube.com/watch?v=GjhsSzRtTGY
[2] 
https://bartoszmilewski.com/2009/10/21/what-does-haskell-have-to-do-with-c/
[3] https://gcc.gnu.org/gcc-4.4/cxx0x_status.html


More information about the Digitalmars-d-announce mailing list