On Monday, 6 March 2017 at 18:06:27 UTC, Andrei Alexandrescu wrote:
On 3/6/17 8:42 AM, Kagamin wrote:
v1==v2;

can be lowered as

{
  import rthelpers:cmp;
  cmp(v1,v2);
}

or something like that

Interesting idea, will keep it in mind. Thanks! -- Andrei

Even better:

in object.d:
---
public import _d_helpers=core.helpers;
---

lowering:
---
v1==v2
to
_d_helpers.cmp(v1,v2)
---

This has the best scalability and zero possibility of code breakage and probably can be done right now. Also since the renamed import must be referenced explicitly, it doesn't need to be processed until used.

Reply via email to