March 20, 2017
On Monday, 20 March 2017 at 21:04:30 UTC, Ali Çehreli wrote:
> Agreed. Surprisingly, there are quite a number of issues that request exactly that, mostly thanks to our old friend bearophile. The following may be the reason for this WAT:

This is another case where I can kinda get it in isolation, but it is weird coming together with everything else. The propagation of size through the expression... but it is a bit weird that explicitly slicing it *still* prefers the static size version.... but ONLY when the compiler can prove the size. Break it into two expressions, and you get the other overload again.

The rules make sense alone, but together, they are just bizarre.
March 20, 2017
On Monday, March 20, 2017 22:47:24 Adam D. Ruppe via Digitalmars-d-learn wrote:
> The rules make sense alone, but together, they are just bizarre.

That's frequently where the language design pitfalls lie. Well-meaning features that seem perfectly reasonable on their own (possibly even unreasonable to not have) interact badly in practice. Sometimes, they're caught, and sometimes they're not. A number of the annoying restrictions in D are there precisely to try and avoid those problems like that that turned up in C++. But we've managed to add new ones. Hopefully, this one can still be fixed.

- Jonathan M Davis

1 2 3 4 5
Next ›   Last »