On 2010-11-04 09:32:35 -0400, simen <[email protected]> said:
I tried D some years ago and liked it's ideas but thought it too soon
to jump in then.
Call this try once.
Then I came back about a year ago to try D version 2 and again found it
also too early to jump in, but, admittedly, still liking the D concept.
IIRC the reason I dropped out the second time was then to do with
cyclic dependency problems that emerged when I tried converting a Java
project to D just for fun.
Call this try twice.
A year later I try D version 2 to see if it has improved. Porting some
rather simple Java code to D and compiling it without error, I am
initially impressed that the SLOC metric is much smaller than the
original Java code. So far, so good until running the simple app, the
same runtime error message surfaces as per my second attempt a year ago:
object.Exception: Cyclic dependency in module test
Call this try twice again and now thrice shy.
This last one is a different problem... and is by design.
D allows cyclic imports between modules. But if one of the modules
involved in the cyclic dependency contains a "static this()" the
runtime will not be able to determine in which order the modules must
be initialized and will complain with the exception you just got.
The error message isn't very clear though.
--
Michel Fortin
[email protected]
http://michelf.com/