Re: Shared with no type in Druntime.

2012-05-01 Thread Jacob Carlborg
On 2012-04-30 20:21, Adam Wilson wrote: I agree, however, DMD has not yet performed it's semantic analysis at the time of DI generation so I have no clue what the type is when the files are generated. Theoretically that could be changed but such a decision is WAY above my paygrade and would prob

Re: Shared with no type in Druntime.

2012-04-30 Thread Adam Wilson
On Sun, 29 Apr 2012 08:21:10 -0700, Jacob Carlborg wrote: On 2012-04-29 05:03, Adam Wilson wrote: Ok, I can accept that. Explicit typing is lots of extra pointless typing when the compiler can just figure it out for me. But that leaves us with an interesting design question. Right now, DI gen

Re: Shared with no type in Druntime.

2012-04-29 Thread Jakob Ovrum
On Sunday, 29 April 2012 at 15:21:10 UTC, Jacob Carlborg wrote: No, I think it's way better that the DI generator outputs the actually type instead of just "shared/auto" and the assignment. In this case: shared stdin = &_iob[0]; Should be generated as: shared File stdin; Anything to the rig

Re: Shared with no type in Druntime.

2012-04-29 Thread Jacob Carlborg
On 2012-04-29 05:03, Adam Wilson wrote: Ok, I can accept that. Explicit typing is lots of extra pointless typing when the compiler can just figure it out for me. But that leaves us with an interesting design question. Right now, DI gen is destructive, which means any changes I make to the DI fil

Re: Shared with no type in Druntime.

2012-04-29 Thread Paulo Pinto
Am 29.04.2012 05:03, schrieb Adam Wilson: On Sat, 28 Apr 2012 19:23:28 -0700, Jonathan M Davis wrote: On Saturday, April 28, 2012 18:32:00 Adam Wilson wrote: Ok, so that answers the legality of the issue, but it smacks of sloppy coding. We cannot ship the DRT as a dynamic library, as has been

Re: Shared with no type in Druntime.

2012-04-28 Thread Adam Wilson
On Sat, 28 Apr 2012 19:23:28 -0700, Jonathan M Davis wrote: On Saturday, April 28, 2012 18:32:00 Adam Wilson wrote: Ok, so that answers the legality of the issue, but it smacks of sloppy coding. We cannot ship the DRT as a dynamic library, as has been discussed and agreed to as a good idea

Re: Shared with no type in Druntime.

2012-04-28 Thread Jonathan M Davis
On Saturday, April 28, 2012 18:32:00 Adam Wilson wrote: > Ok, so that answers the legality of the issue, but it smacks of sloppy > coding. We cannot ship the DRT as a dynamic library, as has been discussed > and agreed to as a good idea, if their are variable declarations that rely > on type infere

Re: Shared with no type in Druntime.

2012-04-28 Thread Adam Wilson
On Sat, 28 Apr 2012 18:23:30 -0700, Ali Çehreli wrote: On 04/28/2012 06:08 PM, Adam Wilson wrote: Ok. So i've been trying to build Phobos with my new DI generation code (available here: https://github.com/LightBender/dmd.git) and i've run into an interesting usage of shared in the D Runtime. N

Re: Shared with no type in Druntime.

2012-04-28 Thread Ali Çehreli
On 04/28/2012 06:08 PM, Adam Wilson wrote: Ok. So i've been trying to build Phobos with my new DI generation code (available here: https://github.com/LightBender/dmd.git) and i've run into an interesting usage of shared in the D Runtime. Namely, it has no type. I've been told that this is not cor

Shared with no type in Druntime.

2012-04-28 Thread Adam Wilson
Ok. So i've been trying to build Phobos with my new DI generation code (available here: https://github.com/LightBender/dmd.git) and i've run into an interesting usage of shared in the D Runtime. Namely, it has no type. I've been told that this is not correct and it should have a type. Is that