April 19, 2017
On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote:
> On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote:
>> [2] https://epi.github.io/2017/03/18/less_fun.html
>
> Great article!

Thanks! I should mention I've also got somewhat positive feedback from Louis [1].

[1] https://twitter.com/LouisDionne/status/843227582803849216
April 19, 2017
On 4/19/17 11:30 AM, Adrian Matoga wrote:
> On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote:
>> On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote:
>>> [2] https://epi.github.io/2017/03/18/less_fun.html
>>
>> Great article!
> 
> Thanks! I should mention I've also got somewhat positive feedback from Louis [1].
> 
> [1] https://twitter.com/LouisDionne/status/843227582803849216

Minor nit in the article--in the following paragraph "runtime" should probably be replaced with "compile time":

"Note the enum in place where C++ version used auto. The type is also inferred automatically, but using enum forces index to be computed at runtime and only then it can be used in static assert."
April 19, 2017
On Wednesday, 19 April 2017 at 18:57:19 UTC, David Gileadi wrote:
> On 4/19/17 11:30 AM, Adrian Matoga wrote:
>> On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote:
>>> On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote:
>>>> [2] https://epi.github.io/2017/03/18/less_fun.html

>
> Minor nit in the article--in the following paragraph "runtime" should probably be replaced with "compile time":
>
> "Note the enum in place where C++ version used auto. The type is also inferred automatically, but using enum forces index to be computed at runtime and only then it can be used in static assert."

Fixed, thanks a lot!
It seems impossible to spot all mistakes without someone else's eyes even if I read it a thousand times... :|
April 19, 2017
On 04/19/2017 12:12 PM, Adrian Matoga wrote:
> On Wednesday, 19 April 2017 at 18:57:19 UTC, David Gileadi wrote:
>> On 4/19/17 11:30 AM, Adrian Matoga wrote:
>>> On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote:
>>>> On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote:
>>>>> [2] https://epi.github.io/2017/03/18/less_fun.html
>
>>
>> Minor nit in the article--in the following paragraph "runtime" should
>> probably be replaced with "compile time":
>>
>> "Note the enum in place where C++ version used auto. The type is also
>> inferred automatically, but using enum forces index to be computed at
>> runtime and only then it can be used in static assert."
>
> Fixed, thanks a lot!
> It seems impossible to spot all mistakes without someone else's eyes
> even if I read it a thousand times... :|

(I saw that too. :) And one more.)

Thank you. Has this been on Reddit yet?

Two typos:

1) A missing underscore made me believe C++ gained a new keyword (make). :)

    auto events = make event_system("foo"_s, "bar"_s, "baz"_s});

2) Replace runtime with compile-time?

    "but using enum forces index to be computed at runtime"

Ali
April 19, 2017
On Wednesday, 19 April 2017 at 18:30:49 UTC, Adrian Matoga wrote:
> On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote:
>> On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote:
>>> [2] https://epi.github.io/2017/03/18/less_fun.html
>>
>> Great article!
>
> Thanks! I should mention I've also got somewhat positive feedback from Louis [1].
>
> [1] https://twitter.com/LouisDionne/status/843227582803849216

Interesting exchange.

Your tweet announcing that post (https://twitter.com/C012294/status/843216981566349312) doesn't show up for me in twitter's hashtag search:

https://twitter.com/hashtag/dlang

Can't say I'm surprised that they're incompetent at searching their own tweets though.
April 20, 2017
On Wednesday, 19 April 2017 at 19:22:11 UTC, Ali Çehreli wrote:
>
> Thank you. Has this been on Reddit yet?

I haven't posted it there, I don't have an account.

> Two typos:
>
> 1) A missing underscore made me believe C++ gained a new keyword (make). :)
>
>     auto events = make event_system("foo"_s, "bar"_s, "baz"_s});

Uhh, that underscore isn't the only problem in this line. ;)
Fixed both, thank you!

April 20, 2017
On Thursday, 20 April 2017 at 05:01:17 UTC, Adrian Matoga wrote:
> On Wednesday, 19 April 2017 at 19:22:11 UTC, Ali Çehreli wrote:
>>
>> Thank you. Has this been on Reddit yet?
>
> I haven't posted it there, I don't have an account.

I'll post it, but not today. It will get more attention if I wait until Friday afternoon GMT.

April 20, 2017
On Wednesday, 19 April 2017 at 08:19:52 UTC, Ali Çehreli wrote:
> I'm brushing up on my C++ to prepare for my C++Now 2017 presentation[1]. boost::hana is an impressive library that overlaps with many D features:
>
>   http://www.boost.org/doc/libs/1_64_0_b2/libs/hana/doc/html/index.html
>
> Have you used boost::hana? What are your thoughts on it?

I've looked at it and concluded that it didn't really offer anything substantial for me over what I can do with C++17 and my own minor extensions to the C++ standard lib.

But I'm not really keen on pulling in boost  in general as the best parts of it ends up in the C++ standard anyway when it is mature...

What specifically are you finding in boost::hana that justifies adding it as a dependency?


April 20, 2017
On 04/20/2017 02:06 AM, Ola Fosheim Grøstad wrote:
> On Wednesday, 19 April 2017 at 08:19:52 UTC, Ali Çehreli wrote:
>> I'm brushing up on my C++ to prepare for my C++Now 2017
>> presentation[1]. boost::hana is an impressive library that overlaps
>> with many D features:
>>
>>   http://www.boost.org/doc/libs/1_64_0_b2/libs/hana/doc/html/index.html
>>
>> Have you used boost::hana? What are your thoughts on it?
>
> I've looked at it and concluded that it didn't really offer anything
> substantial for me over what I can do with C++17 and my own minor
> extensions to the C++ standard lib.
>
> But I'm not really keen on pulling in boost  in general as the best
> parts of it ends up in the C++ standard anyway when it is mature...

To their credit, according to their documentation, boost::hana is a header-only library.

> What specifically are you finding in boost::hana that justifies adding
> it as a dependency?

My motivation is learning enough about modern C++ to not make a fool of myself in front of an expert C++ crowd. :) If I hadn't known about boost::hana, I could have easily stressed D's compile-time features as if C++ did not have them. Now I see that although as-always-less-readable, C++ has lots of compile-time features through boost::hana. For example, boost::hana has the equivalent of AliasSeq, and it's not too inconvenient.

Ali

April 20, 2017
On Thursday, 20 April 2017 at 09:32:02 UTC, Ali Çehreli wrote:
> My motivation is learning enough about modern C++ to not make a fool of myself in front of an expert C++ crowd. :) If I hadn't known about boost::hana, I could have easily stressed D's compile-time features as if C++ did not have them.

Good point. People going to C++ conferences are probably more likely to use (or play with) such libraries than the I-just-want-stuff-done-C++ programmers.

Besides if hana has it then several C++ programmers either use hana or have their own equivalent of it.

> Now I see that although as-always-less-readable, C++ has lots of compile-time features through boost::hana. For example, boost::hana has the equivalent of AliasSeq, and it's not too inconvenient.

I have seen that boost::hana has received praise in the reddit.com/r/cpp group. You might ask there for examples of open source projects that use it in production?