May 21, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On 21 May 2016 at 19:55, Stefan Koch via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On Saturday, 21 May 2016 at 08:45:45 UTC, Manu wrote: >> >> Constraints are a good first-step in that direction, but they're unwieldy, produce the worst looking function signatures (read: documentation) of literally any language ever conceived, relatively awkward error feedback, and very quickly get out of hand if you have many variations of possible constraints. > > > Constraints are enough for simple matters. > As soon as they are used to distinguish between many overloads with > complicated relationships they become slightly crude. > > However this can be worked around with having static ifs and static > asserts(0). > I find myself just one variadic template with a lot of static ifs branches. I also find myself taking that route when I run into cases where there are numerous constraint combinations. It's better in some ways, but worse in others. I think it simplifies API's, but at the same time, it removes information from the API, and takes away a lot of documentation. |
May 21, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 21 May 2016 at 23:20, Andrei Alexandrescu via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On 05/21/2016 04:45 AM, Manu via Digitalmars-d-announce wrote: >> >> On 20 May 2016 at 18:26, Walter Bright via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: >>> >>> On 5/19/2016 11:50 PM, Manu via Digitalmars-d-announce wrote: >>>> >>>> >>>> Ah. Okay, well while this is a very interesting talk, I was indeed hoping you were going to make a D concepts proposal... do you have such a thing in mind, or are you against concepts in D? >>> >>> >>> >>> D has constraints. No point in adding concepts. >> >> >> I really struggle to agree. Constraints are a good first-step in that direction, but they're unwieldy, produce the worst looking function signatures (read: documentation) of literally any language ever conceived, relatively awkward error feedback, and very quickly get out of hand if you have many variations of possible constraints. > > > I guess a lot more detail would be necessary here. A bunch of good folks (at least better than me) have worked for over a decade on C++ concepts and three (three!) proposals later it's still unclear whether they're a good idea. -- Andrei I agree it's not clear to me either. I haven't seen any proposals for D. Have there been any? Constraints obviously work, but I do constantly find myself wishing there were something a little bit closer to the type system. I generally like where C++ is going. I think part of the problem with C++, as always, is that they are in a constant struggle to bolt things on to an ancient language with so many existing spiky angular edge cases that it always seems to become awkward. I think my biggest gripe with constraints in D though, is that they are quite pervasive when you start to produce generic API's, and the documentation becomes a massive problem. Every single person (seriously) I've ever introduced to D has struggled with the phobos docs as soon as constraints are presented. Many of us have raised this many times, and we've had a lot of discussion and various experiments with improving the documentation wrt existing constraints. I'm not sure we've doing a good documentation solution her, and I'm not even confident there's a good solution there. I just don't think it's a great way to express the problem. Concepts, or something like it, feels a lot more intuitive to me, and certainly lends much nicer to documentation and API presentation. |
May 22, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Saturday, 21 May 2016 at 13:51:11 UTC, Manu wrote: > On 21 May 2016 at 23:20, Andrei Alexandrescu via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: >> On 05/21/2016 04:45 AM, Manu via Digitalmars-d-announce wrote: >>> [...] >> >> >> I guess a lot more detail would be necessary here. A bunch of good folks (at least better than me) have worked for over a decade on C++ concepts and three (three!) proposals later it's still unclear whether they're a good idea. -- Andrei > > I agree it's not clear to me either. I haven't seen any proposals for > D. Have there been any? Not quite the same but: https://github.com/dlang/phobos/pull/3677 https://wiki.dlang.org/DIP84#Implementation Atila |
May 22, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jens Müller | On Thursday, 19 May 2016 at 12:54:48 UTC, Jens Müller wrote:
> But ldc looks so bad.
> Any comments from ldc users or developers? Because I see this in many other measurements as well.
This definitely does not match up with my experience. Particularly if you see this in many measurements, there might be something iffy with the way you test. Could you please post a runnable snippet that demonstrates the issue?
In general, could you please directly post any performance issues to the LDC issue tracker on GitHub? We are quite interested in them, but I only happened to come across this post by chance.
— David
|
May 22, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jens Müller | On Thursday, 19 May 2016 at 12:54:48 UTC, Jens Müller wrote: > > For example what's equivalent to gdc's -ffast-math in ldc. This is: https://github.com/ldc-developers/ldc/pull/1472 Working on performance improvements is a lot of fun. Please feed us with code that doesn't run as fast as it should! :) Johan |
May 23, 2016 Re: My ACCU 2016 keynote video available online | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Sunday, 22 May 2016 at 21:16:03 UTC, David Nadlinger wrote: > On Thursday, 19 May 2016 at 12:54:48 UTC, Jens Müller wrote: >> But ldc looks so bad. >> Any comments from ldc users or developers? Because I see this in many other measurements as well. > > This definitely does not match up with my experience. Particularly if you see this in many measurements, there might be something iffy with the way you test. Could you please post a runnable snippet that demonstrates the issue? No need to. Since you said it didn't match your experience I checked. It turns out I was using last years ldc (0.15.2-beta2). Version 0.16.0 behaves similar. But for version 0.17.1 I get the following plots. ldc looks much better. I make a note to check the fast math version once that's release. But the code is integer heavy. https://www.scribd.com/doc/313524674/Running-Time https://www.scribd.com/doc/313524678/Speedup > In general, could you please directly post any performance issues to the LDC issue tracker on GitHub? We are quite interested in them, but I only happened to come across this post by chance. Sorry about that. Next time. Jens |
Copyright © 1999-2021 by the D Language Foundation