digitalmars.D - What was so crazy about IFTI for parent agregate via ctor call ?
- user1234 (13/13) Sep 30 For reference it's the old DIP 40 [0] so a thing like
- Steven Schveighoffer (4/17) Sep 30 I've wanted this forever.
- Daniel N (6/26) Sep 30 C++17 got this already... D used to leave C++ in the dust.
- user1234 (2/7) Oct 01 If any.
- user1234 (10/15) Oct 01 That old ;)
- Dennis (5/6) Oct 02 Prototype implementation:
- user1234 (3/9) Oct 02 Thnaks, that's a good news. Impressive also to see how simple the
For reference it's the old DIP 40 [0] so a thing like ```d struct IPersonallyPresentYouDip40(T) { this(T t){} } void main() { auto v = IPersonallyPresentYouDip40(0); // infer `int` for `T` } ``` should work. [0]: https://wiki.dlang.org/DIP40
Sep 30
On Monday, 30 September 2024 at 12:50:49 UTC, user1234 wrote:For reference it's the old DIP 40 [0] so a thing like ```d struct IPersonallyPresentYouDip40(T) { this(T t){} } void main() { auto v = IPersonallyPresentYouDip40(0); // infer `int` for `T` } ``` should work.I've wanted this forever. https://issues.dlang.org/show_bug.cgi?id=6082 -Steve
Sep 30
On Monday, 30 September 2024 at 15:15:54 UTC, Steven Schveighoffer wrote:On Monday, 30 September 2024 at 12:50:49 UTC, user1234 wrote:C++17 got this already... D used to leave C++ in the dust. https://en.cppreference.com/w/cpp/language/class_template_argument_deduction Since they sorted it out in C++, many of the potential risks should already be understood.For reference it's the old DIP 40 [0] so a thing like ```d struct IPersonallyPresentYouDip40(T) { this(T t){} } void main() { auto v = IPersonallyPresentYouDip40(0); // infer `int` for `T` } ``` should work.I've wanted this forever. https://issues.dlang.org/show_bug.cgi?id=6082 -Steve
Sep 30
On Monday, 30 September 2024 at 15:20:59 UTC, Daniel N wrote:[...] C++17 got this already... D used to leave C++ in the dust. https://en.cppreference.com/w/cpp/language/class_template_argument_deduction Since they sorted it out in C++, many of the potential risks should already be understood.If any.
Oct 01
On Monday, 30 September 2024 at 15:15:54 UTC, Steven Schveighoffer wrote:On Monday, 30 September 2024 at 12:50:49 UTC, user1234 wrote: [...] I've wanted this forever. https://issues.dlang.org/show_bug.cgi?id=6082 -SteveThat old ;) Can this ER be pre-approved ? It's a pure semantics change, plus for now it's an error. I dont think this error is ever involved during the rare time D does SFINAE. I think there's a real value added by this feature, many simplifications. I'm sure you (Steven) know that already but for the others: imagine that the `tuple()` function is not required anymore.
Oct 01
On Monday, 30 September 2024 at 12:50:49 UTC, user1234 wrote:[0]: https://wiki.dlang.org/DIP40Prototype implementation: https://github.com/dlang/dmd/pull/16910 It currently fails if it gets slightly more complicated than your example, but it works as a proof of concept.
Oct 02
On Wednesday, 2 October 2024 at 15:35:40 UTC, Dennis wrote:On Monday, 30 September 2024 at 12:50:49 UTC, user1234 wrote:Thnaks, that's a good news. Impressive also to see how simple the change finally is.[0]: https://wiki.dlang.org/DIP40Prototype implementation: https://github.com/dlang/dmd/pull/16910 It currently fails if it gets slightly more complicated than your example, but it works as a proof of concept.
Oct 02