`with` across function calls
Nicholas Wilson
iamthewilsonator at hotmail.com
Fri Jan 18 14:17:43 UTC 2019
On Friday, 18 January 2019 at 13:51:53 UTC, 12345swordy wrote:
> The main issue I see with this is unintentional function calls.
> with (g)
> {
> bar(); //Meant to call bar() but end up calling bar(g)
> }
Well it'd do what is currently done for
import std.stdio;
void bar() { writeln("()");}
void bar(int i = 0) { writeln("(int)");}
void main()
{
bar(); // ()
}
More information about the Digitalmars-d
mailing list