Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
Speaking of performance, I was intrigued by the Reddit response noting that Rust can go one better by eliminating the error path at compile time: https://www.reddit.com/r/programming/comments/ddi5wb/comment/f2iow4u The commenter suggests that's because Rust bakes the functionality into the com

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 6 October 2019 at 03:47:25 UTC, Seb wrote: My earlier post tried to point out that SumType is an excellent candidate for v2. Sorry, Seb, but I don't get this. There's no reason to wait for a v2 to introduce a new SumType symbol that outperforms the old Variant (assuming it's not po

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Tobias Pankrath via Digitalmars-d-announce
On Sunday, 6 October 2019 at 00:52:38 UTC, Andrei Alexandrescu wrote: Anyhow, currently we would have to name it differently (e.g. dts - https://github.com/wilzbach/dts). Maybe the upcoming SAoC project will change this and allow multiple versions of a library to co-exist in a binary. Adding

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Seb via Digitalmars-d-announce
On Sunday, 6 October 2019 at 07:16:03 UTC, Joseph Rushton Wakeling wrote: On Sunday, 6 October 2019 at 03:47:25 UTC, Seb wrote: My earlier post tried to point out that SumType is an excellent candidate for v2. Sorry, Seb, but I don't get this. There's no reason to wait for a v2 to introduce a

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Dennis via Digitalmars-d-announce
On Sunday, 6 October 2019 at 00:58:17 UTC, SrMordred wrote: But why if this is a final switch? (also assert(0); at the end don´t help ) Because the optimization hasn't been implemented yet. https://issues.dlang.org/show_bug.cgi?id=13169

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 6 October 2019 at 08:27:35 UTC, Seb wrote: Well, my guess it will be similar [...] If you're not the one making those decisions it may be better not to prejudge them. A significant performance improvement is a different beast to moderate API/usability improvements. A standard lib

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Paolo Invernizzi via Digitalmars-d-announce
On Sunday, 6 October 2019 at 02:33:15 UTC, Walter Bright wrote: On 10/5/2019 6:58 AM, Seb wrote: Phobos is essentially dead/frozen (feature-wise). I beg to disagree. A couple cases in point: https://github.com/dlang/phobos/pull/7211 which is a re-imagining, rethinking of hexString. and:

Re: Beta 2.088.1

2019-10-06 Thread uranuz via Digitalmars-d-announce
On Friday, 4 October 2019 at 05:58:03 UTC, Martin Nowak wrote: Glad to announce the first beta for the 2.088.1 point release, ♥ to the 6 contributors. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.088.1.html As usual please report any bugs at https://issues.dlang.org

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 6 October 2019 at 07:18:37 UTC, Joseph Rushton Wakeling wrote: Speaking of performance, I was intrigued by the Reddit response noting that Rust can go one better by eliminating the error path at compile time: D can eliminate error paths at compile time too, e.g. static assert - whi

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread SrMordred via Digitalmars-d-announce
On Sunday, 6 October 2019 at 08:31:20 UTC, Dennis wrote: On Sunday, 6 October 2019 at 00:58:17 UTC, SrMordred wrote: But why if this is a final switch? (also assert(0); at the end don´t help ) Because the optimization hasn't been implemented yet. https://issues.dlang.org/show_bug.cgi?id=13169

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Walter Bright via Digitalmars-d-announce
On 10/6/2019 2:59 AM, Paolo Invernizzi wrote: Well, so there's hope that _very little_ improvements will be merged, in a way or another? I mean, there's some sort of policy for things like that:    https://github.com/dlang/phobos/pull/6730 Frankly speaking, the actual situation it's a little

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 6 October 2019 at 14:08:07 UTC, Adam D. Ruppe wrote: D can eliminate error paths at compile time too, e.g. static assert - which can be used to create all kinds of new useful errors. So I am guessing this is just a case of the code needing a lil tweak or the compiler being conservati

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Paul Backus via Digitalmars-d-announce
On Sunday, 6 October 2019 at 21:49:59 UTC, Joseph Rushton Wakeling wrote: I'm not fluent in assembly so, leaving the error path aside, I wasn't sure how to interpret the "main path" assembly from the D and Rust code, and whether they were practically equivalent (clearly the assembly posted look

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 10/6/19 3:09 AM, Joseph Rushton Wakeling wrote: You misunderstand what I mean by "battle-testing". Clearly designs should go through a high level of testing and usage before they go anywhere near the standard library. But the very fact of being placed in the standard library exposes them to

Re: Blog Post: Beating std::visit Without Really Trying

2019-10-06 Thread Paul Backus via Digitalmars-d-announce
On Monday, 7 October 2019 at 01:09:34 UTC, Andrei Alexandrescu wrote: Well also in the case of SumType there's not even much battle-testing. It's more of an implementation than a design. Take the existing variant, keep the interface, remove the cruft, put in the new nice code. Make it pass the