Re: How to break module into multiple file.

2011-05-13 Thread Jason House
I wonder a bit why you want one file per object? Is it to avoid unnecessary imports? Make finding object definitions easier? Or a style preference? I think replies by others covered all but the first question. I use the import std.foo: bar, baz; syntax for that. Generally speaking, separating

Re: Is this bug or not?

2011-05-06 Thread Jason House
Steven Schveighoffer Wrote: On Fri, 06 May 2011 03:39:31 -0400, Mariusz Gliwiński alienballa...@gmail.com wrote: Is this bug, or is it as supposed to be? I'm not sure... code interface TmpI(T) { void func(T); } class TmpC {} class TmpC2 : TmpC {} class Tmp :

Re: std.parallism

2011-05-05 Thread Jason House
Misuse of std.parallelism can very easily cause accidental sharing of data. Both in the interfaces to std.parallelism and inside the code, the whole shared concept is intentionally side stepped. The only use of shared is when using atomic operations from druntime that were properly coded. I

Re: const/immutable violation?

2011-05-01 Thread Jason House
Ashish Myles Wrote: foo2 = foo; // allowed immutable RHS ??? Allowing this is a bug. File it in bugzilla. Unfortunately, lazy objects mess up the expected const correctness of Object. Even if they are logically const, lazy objects can't always be passed as const.

Re: D compiler for .NET

2009-06-10 Thread Jason House
Daniel Keep Wrote: Jason House wrote: Earlier today, I tried to use the D compiler for .NET from http://dnet.codeplex.com/ Beyond compilation of the compiler, I found zero instructions on what to do next. How do I integrate the compiler into the .NET framework/visual studio

Re: D compiler for .NET

2009-06-10 Thread Jason House
Kagamin Wrote: Jason House Wrote: I'd like to be able to add D files to existing solutions (with C# code). I don't think this feature is available, the author was focused on making CUI compiler only. If VS allows integration of 3rd party compilers, you can use that. BTW how do you

D compiler for .NET

2009-06-09 Thread Jason House
Earlier today, I tried to use the D compiler for .NET from http://dnet.codeplex.com/ Beyond compilation of the compiler, I found zero instructions on what to do next. How do I integrate the compiler into the .NET framework/visual studio? I'd like to be able to add D files to existing

Re: Partial specialisation: howto? (in the right news group this time. *sigh*)

2009-05-17 Thread Jason House
div0 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Simen, That's nicer than the chained static ifs. Is there anyway to get rid of the enum though? Using the enum is a pain as it means you have to edit that import anytime you need to create a specialistion. It's nearly

Re: Delegate contravariance

2009-01-19 Thread Jason House
Silvio Ricardo Cordeiro wrote: Is there any good reason why the following code doesn't work? The function foo requires as its argument a delegate that receives a B. This means that, because of the type soundness of the D language, the delegate will only be called with instances of B. Now,

Re: druntime

2009-01-19 Thread Jason House
Steven Schveighoffer wrote: Hoenir wrote So why don't they port tango to that D1 version of druntime? What is the need? I can only think of one reason: When porting Tango to D2, it'll be one less thing to do.

Re: linking with c

2009-01-10 Thread Jason House
Mike wrote: So I'm trying to link a C file to be used in a D program: I compile the C file with dmc: dmc -c hw.c and the D file with dmd: dmd -c hw_main.d I usually keep it simple and do: dmd main.d hw.obj