Thread overview | |||||
---|---|---|---|---|---|
|
June 23, 2018 why explicitly use "flags" in regex does not work? | ||||
---|---|---|---|---|
| ||||
I got "Error: undefined identifier flags" in here: https://run.dlang.io/is/wquscz Removing "flags =" works. |
June 23, 2018 Re: why explicitly use "flags" in regex does not work? | ||||
---|---|---|---|---|
| ||||
Posted in reply to biocyberman | On Saturday, 23 June 2018 at 12:20:10 UTC, biocyberman wrote: > > I got "Error: undefined identifier flags" in here: > > https://run.dlang.io/is/wquscz > > Removing "flags =" works. I kinda found an answer. It's a bit of a surprise anyway: https://forum.dlang.org/thread/wokfqqbexazcguffwiif@forum.dlang.org?page=1 Long story short, "named" parameter function calling still does not work. IHO, this goes against the readability tendency of D. And I still don't know how if I want to do this: auto func(string a = "a", string b = "b", string c = "c") { write("a: ", a, " b: ", b, " c: ", c); } void main() { func(); func(b ="B"); // Changes default for b only func(c = "C"); // Changes default for c only } |
June 23, 2018 Re: why explicitly use "flags" in regex does not work? | ||||
---|---|---|---|---|
| ||||
Posted in reply to biocyberman | On Saturday, 23 June 2018 at 12:50:17 UTC, biocyberman wrote: > On Saturday, 23 June 2018 at 12:20:10 UTC, biocyberman wrote: >> >> I got "Error: undefined identifier flags" in here: >> >> https://run.dlang.io/is/wquscz >> >> Removing "flags =" works. > > I kinda found an answer. It's a bit of a surprise anyway: https://forum.dlang.org/thread/wokfqqbexazcguffwiif@forum.dlang.org?page=1 > > Long story short, "named" parameter function calling still does not work. Indeed and i'm surprised you didn't know that. The topic has been discussed several times and will be again in the next weeks and months since there are 2 DIP for the feature: [1] https://github.com/dlang/DIPs/pull/123 [2] https://github.com/dlang/DIPs/pull/126 |
Copyright © 1999-2021 by the D Language Foundation