February 01, 2020 How to explicitly state the expression in with(...)? | ||||
---|---|---|---|---|
| ||||
I have quite often this pattern:
with(x.y.z){
xyzFunc(); // = x.y.z.xyzFunc()
myFunc(x.y.z, ...);
}
and it would be cool to write:
with(t = x.y.z){ // work like an implicit alias
xyzFunc(); // = x.y.z.xyzFunc()
myFunc(t, ...);
}
Is there anything which comes near this idea?
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
|
Copyright © 1999-2021 by the D Language Foundation