Re: Cyclic Dependencies

2009-02-16 Thread Ellery Newcomer
Ellery Newcomer wrote: Hello all, I began learning D a few months ago, and now I have a question about cyclic dependencies (and some random whining). I come from a java background and have had no serious exposure to C++. In java, cyclic dependencies are legit to the best of my knowledge. I

Re: Cyclic Dependencies

2008-12-09 Thread Steven Schveighoffer
"Jarrett Billingsley" wrote > It can obviously be argued that since the operands of ?: are constant, > the compiler _could_ figure out that they should be of type wchar[], > but that would make the semantic analysis more complicated, and since > appending 'w' to the strings is far easier, it probab

Re: Cyclic Dependencies

2008-12-09 Thread Ary Borenszweig
Jarrett Billingsley wrote: On Tue, Dec 9, 2008 at 12:00 PM, Ellery Newcomer <[EMAIL PROTECTED]> wrote: Derek Parnell wrote: > It is not a bug. A string literal such as "true" is a char[] type (UTF8), and the compiler will not implicitly convert UTF8 to UTF16 (wchar[]). Which would then beg th

Re: Cyclic Dependencies

2008-12-09 Thread Jarrett Billingsley
On Tue, Dec 9, 2008 at 12:00 PM, Ellery Newcomer <[EMAIL PROTECTED]> wrote: > Derek Parnell wrote: > > It is not a bug. A string literal such as "true" is a char[] type (UTF8), >> >> and the compiler will not implicitly convert UTF8 to UTF16 (wchar[]). > > Which would then beg the obvious > > wcha

Re: Cyclic Dependencies

2008-12-09 Thread Ellery Newcomer
Lars Ivar Igesund wrote: Tango 0.99.7 doesn't support DMD 1.037 - either use DMD 1.033 or check out Tango trunk. Say what you will, I got it to work :) I also experienced the crash on 1.030, 1.033, and 1.035 variously on linux and windows, so 1.037 was just to see if it had been fixed by

Re: Cyclic Dependencies

2008-12-09 Thread Ellery Newcomer
Derek Parnell wrote: > It is not a bug. A string literal such as "true" is a char[] type (UTF8), and the compiler will not implicitly convert UTF8 to UTF16 (wchar[]). Which would then beg the obvious wchar[] w = "true";

Re: Cyclic Dependencies

2008-12-09 Thread Ellery Newcomer
torhu wrote: You can't use module constructors (static this) in modules that import each other. So THAT'S why I couldn't replicate it :)

Re: Cyclic Dependencies

2008-12-09 Thread Jarrett Billingsley
On Tue, Dec 9, 2008 at 9:52 AM, Steven Schveighoffer <[EMAIL PROTECTED]> wrote: > I'm not sure about this problem. I've not encountered it, but it sounds > weird that it would cause a runtime error... It is weird. [a.d] module a; import b; static this(){} void main(){} [b.d] mod

Re: Cyclic Dependencies

2008-12-09 Thread Steven Schveighoffer
"Ellery Newcomer" wrote > Hello all, > > I began learning D a few months ago, and now I have a question about > cyclic dependencies (and some random whining). > > I come from a java background and have had no serious exposure to C++. In > java, cyclic dependencies are legit to the best of my know

Re: Cyclic Dependencies

2008-12-09 Thread Denis Koroskin
On Tue, 09 Dec 2008 10:26:29 +0300, Ellery Newcomer <[EMAIL PROTECTED]> wrote: Also, I would be trying to compile with DMD, but I have evidently managed to crash the compiler, and I don't know if it's DMD's fault or mine. It reports an Internal Error in e2ir.c at line 3904. (not being a C++

Re: Cyclic Dependencies

2008-12-09 Thread Lars Ivar Igesund
Ellery Newcomer wrote: > Hello all, > > I began learning D a few months ago, and now I have a question about > cyclic dependencies (and some random whining). > > I come from a java background and have had no serious exposure to C++. > In java, cyclic dependencies are legit to the best of my know

Re: Cyclic Dependencies

2008-12-09 Thread torhu
Ellery Newcomer wrote: When I first started learning D I decided that a good way to learn it would be by porting a popular java api (mind, I didn't say intelligent), which came complete with a few cyclic dependencies. At the moment, I'm using GDC, and it refuses to swallow cyclic dependencies.

Re: Cyclic Dependencies

2008-12-09 Thread Derek Parnell
On Tue, 09 Dec 2008 01:26:29 -0600, Ellery Newcomer wrote: > > wchar[] w = (true)? "true":"false"; > > --> Error: cannot implicitly convert expression ("true") of type char[] > to wchar[] > > or should it be reported as a bug? It is not a bug. A string literal such as "true" is a char[] type

Re: Cyclic Dependencies

2008-12-08 Thread Zarathustra
Ellery Newcomer Wrote: > Hello all, > > I began learning D a few months ago, and now I have a question about > cyclic dependencies (and some random whining). > > I come from a java background and have had no serious exposure to C++. > In java, cyclic dependencies are legit to the best of my kn