QtD 0.1 is out!

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon Feb 16 08:19:36 PST 2009


On Mon, Feb 16, 2009 at 7:10 AM, grauzone <none at example.net> wrote:
> Jarrett Billingsley wrote:
>>
>> On Sun, Feb 15, 2009 at 9:27 PM, Eldar Insafutdinov
>> <e.insafutdinov at gmail.com> wrote:
>>>>
>>>> The reason why is this file is big is in this bug
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that
>>>> placing enums outside the class is a good idea, because enums will be
>>>> exposed to global namespace unlike original Qt version. I have just checked,
>>>> if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which
>>>> means that we have to keep that file big until this bug is fixed.
>>>
>>> Anyway, I tried to place enums outside the classes, and I got:
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>> qt/core/QFile.d(24): Error: enum FileError is forward referenced
>>>
>>> Circular import is present.
>>
>> You would do well to remove all circular imports.  They make the
>> compiler do stupid things.
>
> I really wonder why Walter doesn't just forbid circular dependencies in the
> language spec.

Because that's redefining the problem rather than solving it?

Circular dependencies are not always a sign of bad design.  Shoving
everything into one module sure is.


More information about the Digitalmars-d-announce mailing list