Re: import locality with function parameters

2024-02-01 Thread Carl Sturtivant via Digitalmars-d-learn
On Friday, 2 February 2024 at 01:23:11 UTC, Steven Schveighoffer wrote: Are you thinking of this? https://dlang.org/phobos/object.html#.imported -Steve Yes! Glad it's now part of D. Thank you.

Re: import locality with function parameters

2024-02-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On Friday, 2 February 2024 at 00:29:51 UTC, Carl Sturtivant wrote: Hello, I seem to recall that there is surprising template to import a module and get a type from it inside the declaration of the type of a parameter to a function, so that the module need not be imported outside of the

import locality with function parameters

2024-02-01 Thread Carl Sturtivant via Digitalmars-d-learn
Hello, I seem to recall that there is surprising template to import a module and get a type from it inside the declaration of the type of a parameter to a function, so that the module need not be imported outside of the function definition. I think there was a blog article some years ago