www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - core.compiler versus std.compiler

reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <xtzgzorex gmail.com> writes:
Hi,

I noticed that druntime has a core.compiler module as well. Recently, 
I've been submitting patches to std.compiler. Should core.compiler be 
removed, or perhaps std.compiler be moved there and marked as deprecated 
in Phobos?

On a related note: https://github.com/D-Programming-Language/phobos/pull/163

- Alex
Jul 31 2011
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Sunday 31 July 2011 19:24:33 Alex R=C3=B8nne Petersen wrote:
 Hi,
=20
 I noticed that druntime has a core.compiler module as well. Recently,=
 I've been submitting patches to std.compiler. Should core.compiler be=
 removed, or perhaps std.compiler be moved there and marked as depreca=
ted
 in Phobos?
=20
 On a related note: https://github.com/D-Programming-Language/phobos/p=
ull/163 If it's in both, then I believe that the general rule is that it should= be in=20 druntime instead, since a number of modules were originall in Phobos bu= t were=20 moved to druntime - mostly C bindings and the like. But I don't know ab= out=20 this particular case. I'd be inclined to say that we should just go wit= h the=20 core one, since it's there, but Sean might have different ideas on that= . I=20 don't know. But it certainly does look like unnecessary duplication at = the=20 moment. - Jonathan M Davis
Jul 31 2011
parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 31-07-2011 21:32, Jonathan M Davis wrote:
 On Sunday 31 July 2011 19:24:33 Alex Rønne Petersen wrote:
 Hi,

 I noticed that druntime has a core.compiler module as well. Recently,
 I've been submitting patches to std.compiler. Should core.compiler be
 removed, or perhaps std.compiler be moved there and marked as deprecated
 in Phobos?

 On a related note: https://github.com/D-Programming-Language/phobos/pull/163
If it's in both, then I believe that the general rule is that it should be in druntime instead, since a number of modules were originall in Phobos but were moved to druntime - mostly C bindings and the like. But I don't know about this particular case. I'd be inclined to say that we should just go with the core one, since it's there, but Sean might have different ideas on that. I don't know. But it certainly does look like unnecessary duplication at the moment. - Jonathan M Davis
I agree; using core seems sane. It's a feature you'd expect to be there without linking to Phobos anyway. I'll just leave the pull request open until we figure something out. You could pull it in and just copy it over to druntime if that's how we end up doing it. - Alex
Jul 31 2011
parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 31-07-2011 21:44, Alex Rønne Petersen wrote:
 On 31-07-2011 21:32, Jonathan M Davis wrote:
 On Sunday 31 July 2011 19:24:33 Alex Rønne Petersen wrote:
 Hi,

 I noticed that druntime has a core.compiler module as well. Recently,
 I've been submitting patches to std.compiler. Should core.compiler be
 removed, or perhaps std.compiler be moved there and marked as deprecated
 in Phobos?

 On a related note:
 https://github.com/D-Programming-Language/phobos/pull/163
If it's in both, then I believe that the general rule is that it should be in druntime instead, since a number of modules were originall in Phobos but were moved to druntime - mostly C bindings and the like. But I don't know about this particular case. I'd be inclined to say that we should just go with the core one, since it's there, but Sean might have different ideas on that. I don't know. But it certainly does look like unnecessary duplication at the moment. - Jonathan M Davis
I agree; using core seems sane. It's a feature you'd expect to be there without linking to Phobos anyway. I'll just leave the pull request open until we figure something out. You could pull it in and just copy it over to druntime if that's how we end up doing it. - Alex
Oh, BTW, I have pushed a few additional commits to my forks. One includes removing ctype.d from druntime [1], since it's already marked for deprecation in Phobos, and the one in druntime was just a duplicate (without documentation). I don't know if this is appropriate, but I found it highly unlikely that anyone would be using the one in druntime. Is this OK? I would send an additional pull request, but GitHub is a bit flaky when it comes to sending pull requests with only single commits in them... If the commit is OK, you may have to cherry-pick it (at least until my outstanding pull request is closed). [1] https://github.com/IgniteInteractiveStudio/druntime/commit/fafc1456db99bac63e6dd173329144f3f984a0b4 - Alex
Jul 31 2011
prev sibling parent reply David Nadlinger <see klickverbot.at> writes:
On 7/31/11 7:24 PM, Alex Rønne Petersen wrote:
 I noticed that druntime has a core.compiler module as well. Recently,
 I've been submitting patches to std.compiler. Should core.compiler be
 removed, or perhaps std.compiler be moved there and marked as deprecated
 in Phobos?
1. There doesn't seem to be a core.compiler in druntime. 2. What would such a module be needed for in the first place? Besides, keeping a central list of all available D compilers in the standard library doesn't quite seem like a good idea to me… David
Jul 31 2011
parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 31-07-2011 21:50, David Nadlinger wrote:
 On 7/31/11 7:24 PM, Alex Rønne Petersen wrote:
 I noticed that druntime has a core.compiler module as well. Recently,
 I've been submitting patches to std.compiler. Should core.compiler be
 removed, or perhaps std.compiler be moved there and marked as deprecated
 in Phobos?
1. There doesn't seem to be a core.compiler in druntime. 2. What would such a module be needed for in the first place? Besides, keeping a central list of all available D compilers in the standard library doesn't quite seem like a good idea to me… David
1. Sorry, you're completely right. It's actually called /rt/.compiler; my bad: https://github.com/D-Programming-Language/druntime/blob/master/src/rt/compiler.d 2. I don't see any particular harm in maintaining the list. What you're saying is true, though; there is arguably no use in having it there. The only purpose it would serve is to avoid confusion surrounding compiler-specific version definitions. - Alex
Jul 31 2011