On Monday, 8 June 2020 at 16:02:02 UTC, Steven Schveighoffer
wrote:
On 6/8/20 11:11 AM, jmh530 wrote:
On Monday, 8 June 2020 at 14:27:26 UTC, data pulverizer wrote:
[snip]
Out of curiosity what does the "." in front of `foo` mean?
[snip]
ag0aep6g provided the link to it [snip]
The dot
On 6/8/20 11:11 AM, jmh530 wrote:
On Monday, 8 June 2020 at 14:27:26 UTC, data pulverizer wrote:
[snip]
Out of curiosity what does the "." in front of `foo` mean? I've seen
that in some D code on the compiler in GitHub and have no idea what it
does. I tried Googling it to no avail. It
On Monday, 8 June 2020 at 14:27:26 UTC, data pulverizer wrote:
[snip]
Out of curiosity what does the "." in front of `foo` mean? I've
seen that in some D code on the compiler in GitHub and have no
idea what it does. I tried Googling it to no avail. It doesn't
have anything to do with UFCS
On 08.06.20 16:27, data pulverizer wrote:
Out of curiosity what does the "." in front of `foo` mean? I've seen
that in some D code on the compiler in GitHub and have no idea what it
does. I tried Googling it to no avail. It doesn't have anything to do
with UFCS does it?
On Monday, 8 June 2020 at 02:55:25 UTC, jmh530 wrote:
```
...
template foo(string f) {
mixin("alias foo = .foo!(" ~ f ~ ");");
}
...
```
Out of curiosity what does the "." in front of `foo` mean? I've
seen that in some D code on the compiler in GitHub and have no
idea what it does. I
On Monday, 8 June 2020 at 12:20:46 UTC, Adam D. Ruppe wrote:
[snip]
Why do you even want foo!"fabs"? Usually when I see people
having this problem it is actually a misunderstanding of what
is possible with the foo!fabs style - which is better in
basically every way and can be used in most
On Monday, 8 June 2020 at 10:41:53 UTC, jmh530 wrote:
On Monday, 8 June 2020 at 10:28:39 UTC, Paul Backus wrote:
[snip]
Thanks for that suggestion. That works for me.
Unfortunately, it's probably not worth the extra effort though,
versus doing foo!fabs in my case.
If they are all from
On Monday, 8 June 2020 at 02:55:25 UTC, jmh530 wrote:
In the code below, foo!fabs compiles without issue, but
foo!"fabs" does not because the import is not available in the
string mixin.
Why do you even want foo!"fabs"? Usually when I see people having
this problem it is actually a
On Monday, 8 June 2020 at 10:28:39 UTC, Paul Backus wrote:
[snip]
Thanks for that suggestion. That works for me.
Unfortunately, it's probably not worth the extra effort though,
versus doing foo!fabs in my case.
On Monday, 8 June 2020 at 10:23:24 UTC, jmh530 wrote:
On Monday, 8 June 2020 at 04:13:08 UTC, Mike Parker wrote:
[snip]
The problem isn't the mixin. It's the template. Templates take
the scope of their declaration, not their instantiation. So
the mixin is getting the template's scope.
On Monday, 8 June 2020 at 04:13:08 UTC, Mike Parker wrote:
[snip]
The problem isn't the mixin. It's the template. Templates take
the scope of their declaration, not their instantiation. So the
mixin is getting the template's scope.
Anyway, this appears to work:
`double z =
On Monday, 8 June 2020 at 02:55:25 UTC, jmh530 wrote:
In the code below, foo!fabs compiles without issue, but
foo!"fabs" does not because the import is not available in the
string mixin. If I move the import to the top of the module,
then it works. However, then if I move foo to another
12 matches
Mail list logo