Re: Renaming Flag!"" in API

2020-10-12 Thread FreeSlave via Digitalmars-d-learn
On Monday, 12 October 2020 at 16:44:52 UTC, Ali Çehreli wrote: It's amazing how things come together before each conference. Flag appears among my slides for an upcoming conference as well! :) But I don't think there is any solution to your problem. On 10/12/20 3:24 AM, FreeSlave wrote: >

Re: Renaming Flag!"" in API

2020-10-12 Thread Ali Çehreli via Digitalmars-d-learn
It's amazing how things come together before each conference. Flag appears among my slides for an upcoming conference as well! :) But I don't think there is any solution to your problem. On 10/12/20 3:24 AM, FreeSlave wrote: > Later I realize that 'myflagname' is a bad name and I want to

Re: Renaming Flag!"" in API

2020-10-12 Thread FreeSlave via Digitalmars-d-learn
On Monday, 12 October 2020 at 11:34:25 UTC, Vladimir Panteleev wrote: On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote: Can this issue overcome somehow? Why not add a deprecated overload for your function which takes the old Flag value? I thought about overloading too.

Re: Renaming Flag!"" in API

2020-10-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/12/20 7:34 AM, Vladimir Panteleev wrote: On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote: Can this issue overcome somehow? Why not add a deprecated overload for your function which takes the old Flag value? Or even not deprecated (if it still makes sense). -Steve

Re: Renaming Flag!"" in API

2020-10-12 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote: Can this issue overcome somehow? Why not add a deprecated overload for your function which takes the old Flag value?

Re: Renaming Flag!"" in API

2020-10-12 Thread aliak via Digitalmars-d-learn
On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote: Let's say I use Flag type named 'myflagname' in API like this: import std.typecons; void func(Flag!"myflagname" flag) { //... } void main() { func(Yes.myflagname); } Later I realize that 'myflagname' is a bad name and I want to

Re: Renaming Flag!"" in API

2020-10-12 Thread user1234 via Digitalmars-d-learn
On Monday, 12 October 2020 at 10:24:44 UTC, FreeSlave wrote: Let's say I use Flag type named 'myflagname' in API like this: import std.typecons; void func(Flag!"myflagname" flag) { //... } void main() { func(Yes.myflagname); } Later I realize that 'myflagname' is a bad name and I want to

Renaming Flag!"" in API

2020-10-12 Thread FreeSlave via Digitalmars-d-learn
Let's say I use Flag type named 'myflagname' in API like this: import std.typecons; void func(Flag!"myflagname" flag) { //... } void main() { func(Yes.myflagname); } Later I realize that 'myflagname' is a bad name and I want to change it to something else. But if I do so, I break the