www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any update on: named paramters DIP and string interpolation?

reply Martin Tschierschke <mt smartdolphin.de> writes:
Anything new about the status of this language enhancements?

Best regards
mt.
Aug 26 2022
next sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke 
wrote:
 Anything new about the status of this language enhancements?

 Best regards
 mt.
Max got stuck on the named parameters implementation. Moving forward with it is on is todo list. No one has submitted a new DIP for string interpolation yet.
Aug 26 2022
next sibling parent reply mw <mingwu gmail.com> writes:
On Friday, 26 August 2022 at 14:22:11 UTC, Mike Parker wrote:
 On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke 
 wrote:
 Anything new about the status of this language enhancements?

 Best regards
 mt.
Max got stuck on the named parameters implementation. Moving forward with it is on is todo list. No one has submitted a new DIP for string interpolation yet.
This has been talked about for years, the DIP process is really slow or not moving forward at all, while users really want to use those *now*. So instead, I did it (string interpolation) in the lib: https://code.dlang.org/packages/jdiutil
Aug 26 2022
parent reply Mike Parker <aldacron gmail.com> writes:
On Friday, 26 August 2022 at 17:48:00 UTC, mw wrote:

 This has been talked about for years, the DIP process is really 
 slow or not moving forward at all,
This has nothing to do with the DIP process. No string interpolation DIP is in the queue right now.
Aug 26 2022
parent reply mw <mingwu gmail.com> writes:
On Saturday, 27 August 2022 at 02:56:46 UTC, Mike Parker wrote:

 This has nothing to do with the DIP process. No string 
 interpolation DIP is in the queue right now.
I remember there used to be, maybe more than one string interpolation DIPs for years, so they all are got rejected? Anyways,this is one of the most frequently asked feature in D. Even Python added into the language, not sure how many PEPs they have gone through. But I feel D is lagging far behind. For this particular (relative simple) feature, I think we should Just-Do-It, that's why I named my package "JDI"util: https://code.dlang.org/packages/jdiutil Actually that's the spirit I want promote in the D community: there have been a number of known D issues unsolved for years, and people ask for their resolution again and again, so can we Just-Do-It?
Aug 26 2022
parent Mike Parker <aldacron gmail.com> writes:
On Saturday, 27 August 2022 at 03:46:55 UTC, mw wrote:
 On Saturday, 27 August 2022 at 02:56:46 UTC, Mike Parker wrote:

 This has nothing to do with the DIP process. No string 
 interpolation DIP is in the queue right now.
I remember there used to be, maybe more than one string interpolation DIPs for years, so they all are got rejected?
You can see the status of any DIP that has undergone review here: https://github.com/dlang/DIPs/blob/master/DIPs/README.md Then at the bottom of each DIP, in the 'Reviews' section (linked in the TOC of each DIP) you can see a summary of each review round. Walter rejected his own string interpolation DIP: https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1027.md A second one was withdrawn by the authors after two rounds of Community Review: https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1036.md
Aug 26 2022
prev sibling parent reply Martin Tschierschke <mt smartdolphin.de> writes:
On Friday, 26 August 2022 at 14:22:11 UTC, Mike Parker wrote:
 On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke 
 wrote:
 Anything new about the status of this language enhancements?
[...]
 Max got stuck on the named parameters implementation. Moving 
 forward with it is on is todo list.
So thank you Mike and Max, your work and your success is very welcome!
 No one has submitted a new DIP for string interpolation yet.
Ok. My impression from the discussion was, that a new DIP was in preparation in the background - wishful thinking ? :-)
Aug 29 2022
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/29/22 10:43 AM, Martin Tschierschke wrote:
 On Friday, 26 August 2022 at 14:22:11 UTC, Mike Parker wrote:
 On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke wrote:
 Anything new about the status of this language enhancements?
[...]
 Max got stuck on the named parameters implementation. Moving forward 
 with it is on is todo list.
So thank you Mike and Max, your work and your success is very welcome!
 No one has submitted a new DIP for string interpolation yet.
Ok. My impression from the discussion was, that a new DIP was in preparation in the background - wishful thinking ? :-)
John Colvin and myself have had an idea on a DIP for string interpolation. We discussed it with Adam Ruppe and Steven Schveighoffer who found it satisfactory. The work is at a stage where I need to edit the proposal (which is now in a private repo) to reflect that idea. With my changing jobs I didn't have the time to do so. Hopefully either myself or John could carry it forward in the near future.
Aug 29 2022
next sibling parent Martin Tschierschke <mt smartdolphin.de> writes:
On Monday, 29 August 2022 at 08:45:38 UTC, Andrei Alexandrescu 
wrote:
[...]
 No one has submitted a new DIP for string interpolation yet.
Ok. My impression from the discussion was, that a new DIP was in preparation in the background - wishful thinking ? :-)
John Colvin and myself have had an idea on a DIP for string interpolation. We discussed it with Adam Ruppe and Steven Schveighoffer who found it satisfactory. The work is at a stage where I need to edit the proposal (which is now in a private repo) to reflect that idea. With my changing jobs I didn't have the time to do so. Hopefully either myself or John could carry it forward in the near future.
Sounds good! So the same for you and John: Thank you, your work and your success is very welcome!
Aug 29 2022
prev sibling parent reply 12345swordy <alexanderheistermann gmail.com> writes:
On Monday, 29 August 2022 at 08:45:38 UTC, Andrei Alexandrescu 
wrote:
 On 8/29/22 10:43 AM, Martin Tschierschke wrote:
 On Friday, 26 August 2022 at 14:22:11 UTC, Mike Parker wrote:
 [...]
[...]
 [...]
So thank you Mike and Max, your work and your success is very welcome!
 [...]
Ok. My impression from the discussion was, that a new DIP was in preparation in the background - wishful thinking ? :-)
John Colvin and myself have had an idea on a DIP for string interpolation. We discussed it with Adam Ruppe and Steven Schveighoffer who found it satisfactory. The work is at a stage where I need to edit the proposal (which is now in a private repo) to reflect that idea. With my changing jobs I didn't have the time to do so. Hopefully either myself or John could carry it forward in the near future.
Wait, why is it in a private repo? - Alex
Aug 29 2022
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/29/22 4:38 PM, 12345swordy wrote:
 On Monday, 29 August 2022 at 08:45:38 UTC, Andrei Alexandrescu wrote:
 On 8/29/22 10:43 AM, Martin Tschierschke wrote:
 On Friday, 26 August 2022 at 14:22:11 UTC, Mike Parker wrote:
 [...]
[...]
 [...]
So thank you Mike and Max, your work and your success is very welcome!
 [...]
Ok. My impression from the discussion was, that a new DIP was in preparation in the background - wishful thinking ? :-)
John Colvin and myself have had an idea on a DIP for string interpolation. We discussed it with Adam Ruppe and Steven Schveighoffer who found it satisfactory. The work is at a stage where I need to edit the proposal (which is now in a private repo) to reflect that idea. With my changing jobs I didn't have the time to do so. Hopefully either myself or John could carry it forward in the near future.
Wait, why is it in a private repo?
It's a draft not ready for review. Once it will be ready for review it will be of course published.
Aug 29 2022
parent Dennis <dkorpel gmail.com> writes:
On Monday, 29 August 2022 at 19:28:05 UTC, Andrei Alexandrescu 
wrote:
 It's a draft not ready for review. Once it will be ready for 
 review it will be of course published.
I thought it was public: https://github.com/John-Colvin/YAIDIP Or is that an old version?
Aug 29 2022
prev sibling parent reply cc <cc nevernet.com> writes:
On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke 
wrote:
 Anything new about the status of this language enhancements?

 Best regards
 mt.
If you need string interpolation yesterday and don't mind using mixins... ```d import std.stdio; import std.string; import std.array; import std.range.primitives; string mwrite(string str) safe pure { size_t istart; bool inword = false; auto result = appender!(string[]); auto vars = appender!(string[]); foreach (i, dchar c; str) { if (!inword) { if (c == '{') { result.put(str[istart .. i]); istart = i+1; inword = true; } } else { if (c == '}') { result.put("%s"); vars.put(str[istart .. i]); istart = i+1; inword = false; } } } if (!inword && istart < str.length) put(result, str[istart .. $]); return format!`writef("%s", %s);`(result.data.join, vars.data.join(`, `)); } string mwriteln(string str) safe pure { string result = mwrite(str); enum toReplace = "writef("; return "writefln(" ~ result[toReplace.length .. $]; } void main() { int x = 4; float y = 3.5; mixin(mwriteln(`X:{x} Y:{y}`)); mixin(mwriteln(`Which is larger? {x>y?"X":"Y"}`)); } ```
Sep 02 2022
parent Martin Tschierschke <mt smartdolphin.de> writes:
On Friday, 2 September 2022 at 17:17:18 UTC, cc wrote:
 On Friday, 26 August 2022 at 12:57:58 UTC, Martin Tschierschke 
 wrote:
 Anything new about the status of this language enhancements?

 Best regards
 mt.
If you need string interpolation yesterday and don't mind using mixins...
Thanks, very cool result with little coding!
Sep 05 2022