BCS wrote:
Hello Don,
You could relax the rule: Even if modules A and B both have 'static
this', there is no circular dependency if:
(1) throughout the whole of module A, it only uses pure functions from
module B.
OR
(2) if the constructor of module A doesn't directly access static
variables of module B, and EVERY function it calls is pure.
But that probably doesn't open up very many use cases.
or (3) the compiler can prove no dependency exists. Yes this gets into
some interesting "Is is illegal code" issues but...
No.
The problem with that is that it's a nightmare for portability. Code
which will work fine on compiler A, won't compiler on compiler B.
You'd have to precisely define which scenarios are allowed. The two I
proposed are simple cases where it can prove no dependency exists. No
doubt there are many more.
- Re: static this sucks, we s... Ary Borenszweig
- Re: static this sucks, we s... Steven Schveighoffer
- Re: static this sucks, we s... Ary Borenszweig
- Re: static this sucks, we s... Steven Schveighoffer
- Re: static this sucks, we s... Christopher Wright
- Re: static this sucks, we s... Christopher Wright
- Re: static this sucks, we s... Walter Bright
- Re: static this sucks, we s... Don
- Re: static this sucks, we s... BCS
- Re: static this sucks, we s... Jarrett Billingsley
- Re: static this sucks, we s... Don
- Re: static this sucks, we s... BCS
- Re: static this sucks, we should dep... Frank Benoit
- Re: static this sucks, we should deprecate it BCS