phobos dependencies

Timon Gehr timon.gehr at gmx.ch
Tue Jan 7 08:35:48 PST 2014


On 01/07/2014 05:20 PM, Andrei Alexandrescu wrote:
> On 1/7/14 3:25 AM, monarch_dodra wrote:
>> Given that you *probably* imported "foo" with the plan to *use* one of
>> its functions, you'll encounter an unqualified call sooner rather than
>> later, and any "win" will promptly be lost.
>
> It's not a one- or two-levels win, it's a transitive win. An unqualified
> call in one implementation would trigger only one level of import.
>
> That said I agree it's suboptimal, but it's a net improvement in the
> compiler that requires zero changes to source code. According to Walter
> it would also get rid of some forward declarations issues.
>
>
> Andrei
>

Without introducing new ones?

The problem with getting rid of some forward declarations issues in the 
past has been that some new ones were often introduced due to the 
analysis order changing in ad-hoc ways.

What is the status of getting rid of _all_ forward declarations issues 
except those in a precisely specified set of uninterpretable usages?

E.g. I have no precise image of how arbitrary forward referencing of 
enum members is actually supposed to work in a consistent way without 
base type annotation.


More information about the Digitalmars-d mailing list