On Wednesday, July 04, 2018 11:50:07 Steven Schveighoffer via Digitalmars-d
wrote:
> The obvious pros to ditching package.d and using a directory and module
> with the same name are: 1. no ambiguity in the filesystem (assuming you
> don't have weird package/file schemes) and 2. It's more
On 7/4/18 11:29 AM, Jonathan M Davis wrote:
On Wednesday, July 04, 2018 11:13:07 Steven Schveighoffer via Digitalmars-d
wrote:
I think if we went the different route we would have to provide a
mechanism to declare inside the module "this is a package". Maybe
"package module"?
I would point
On Wednesday, July 04, 2018 11:13:07 Steven Schveighoffer via Digitalmars-d
wrote:
> I think if we went the different route we would have to provide a
> mechanism to declare inside the module "this is a package". Maybe
> "package module"?
I would point out that the pretty much the only reason
is a good idea, and if we should try
to get rid of it as well.
How would this affect the package attribute?
Currently, anything inside the package.d file that is attributed with
package is limited to the package itself, not where the package
resides. Likewise, anything attributed with package
On 7/4/18 10:59 AM, Adam D. Ruppe wrote:
On Wednesday, 4 July 2018 at 14:54:41 UTC, Steven Schveighoffer wrote:
How would this affect the package attribute?
Nothing should change, since packages are determined from the D module
declaration, not the filename or directory layout.
This is
, it has to be 'foo/mod.rs'.
Now in the Rust 2018 edition, they are getting rid of mod.rs.
So when you import 'foo', rustc will always look for 'foo.rs',
and if 'foo' has submodules, it can still reside in
'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we
should
On Wednesday, 4 July 2018 at 14:54:41 UTC, Steven Schveighoffer
wrote:
How would this affect the package attribute?
Nothing should change, since packages are determined from the D
module declaration, not the filename or directory layout.
This is even true with package.d itself, but it is a
, they are getting rid of mod.rs. So when
you import 'foo', rustc will always look for 'foo.rs', and if 'foo' has
submodules, it can still reside in 'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we should try to
get rid of it as well.
How would this affect the package attribute
edition, they are getting rid of mod.rs.
So when you import 'foo', rustc will always look for 'foo.rs',
and if 'foo' has submodules, it can still reside in
'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we
should try to get rid of it as well.
when I started D I
On Tuesday, 3 July 2018 at 12:51:59 UTC, bauss wrote:
On Tuesday, 3 July 2018 at 12:51:18 UTC, bauss wrote:
On Sunday, 1 July 2018 at 11:36:51 UTC, Yuxuan Shui wrote:
[...]
I use package.d for more than just submodules.
I use it to share modules from different packages into a
single
-modules, it has to be 'foo/mod.rs'.
Now in the Rust 2018 edition, they are getting rid of mod.rs.
So when you import 'foo', rustc will always look for 'foo.rs',
and if 'foo' has submodules, it can still reside in
'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we
edition, they are getting rid of mod.rs.
So when you import 'foo', rustc will always look for 'foo.rs',
and if 'foo' has submodules, it can still reside in
'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we
should try to get rid of it as well.
I use package.d
On 07/01/2018 10:23 AM, Yuxuan Shui wrote:
I was suggesting we do what Rust did. i.e. 'import foo', imports foo.d,
which can in turn do 'import foo.bar', which will import foo/bar.d.
AIUI, D doesn't support having *both* a module (ie, file 'foo.d') and a
package (ie, directory 'foo/') with
On Sunday, July 01, 2018 14:23:36 Yuxuan Shui via Digitalmars-d wrote:
> On Sunday, 1 July 2018 at 11:55:17 UTC, Jonathan M Davis wrote:
> > On Sunday, July 01, 2018 11:36:51 Yuxuan Shui via Digitalmars-d
> >
> > wrote:
> >> [...]
> >
> > The entire reason that package.d was added as a feature was
On Sunday, 1 July 2018 at 21:40:05 UTC, Yuxuan Shui wrote:
On Sunday, 1 July 2018 at 18:03:41 UTC, Adam D. Ruppe wrote:
On Sunday, 1 July 2018 at 14:23:36 UTC, Yuxuan Shui wrote:
I was suggesting we do what Rust did. i.e. 'import foo',
imports foo.d, which can in turn do 'import foo.bar',
On Sunday, 1 July 2018 at 18:03:41 UTC, Adam D. Ruppe wrote:
On Sunday, 1 July 2018 at 14:23:36 UTC, Yuxuan Shui wrote:
I was suggesting we do what Rust did. i.e. 'import foo',
imports foo.d, which can in turn do 'import foo.bar', which
will import foo/bar.d.
Yeah, that's the way it should
On Sunday, 1 July 2018 at 14:23:36 UTC, Yuxuan Shui wrote:
On Sunday, 1 July 2018 at 11:55:17 UTC, Jonathan M Davis wrote:
On Sunday, July 01, 2018 11:36:51 Yuxuan Shui via
Digitalmars-d wrote:
[...]
The entire reason that package.d was added as a feature was so
that modules could be split
On Sunday, 1 July 2018 at 14:23:36 UTC, Yuxuan Shui wrote:
I was suggesting we do what Rust did. i.e. 'import foo',
imports foo.d, which can in turn do 'import foo.bar', which
will import foo/bar.d.
Yeah, that's the way it should have been done in the first place.
Nowhere else in D does it
On Sunday, 1 July 2018 at 11:55:17 UTC, Jonathan M Davis wrote:
On Sunday, July 01, 2018 11:36:51 Yuxuan Shui via Digitalmars-d
wrote:
[...]
The entire reason that package.d was added as a feature was so
that modules could be split into packages without breaking
code, and it's still
rs'.
>
> Now in the Rust 2018 edition, they are getting rid of mod.rs. So
> when you import 'foo', rustc will always look for 'foo.rs', and
> if 'foo' has submodules, it can still reside in
> 'foo/submodule.rs'.
>
> This makes me think if package.d is a good idea, and if we shou
, they are getting rid of mod.rs. So when
you import 'foo', rustc will always look for 'foo.rs', and if 'foo' has
submodules, it can still reside in 'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we should try to
get rid of it as well.
We added it a few years ago after 10
'foo', rustc will always look for 'foo.rs', and
if 'foo' has submodules, it can still reside in
'foo/submodule.rs'.
This makes me think if package.d is a good idea, and if we should
try to get rid of it as well.
22 matches
Mail list logo