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 understan
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 out
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 tha
On 7/4/18 11:06 AM, aliak wrote:
On Wednesday, 4 July 2018 at 14:54:41 UTC, Steven Schveighoffer wrote:
On 7/1/18 7:36 AM, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very similar to
package.d. When you use a module 'foo' in Rust, it can either be
'foo.rs' or 'foo/mod
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 even
On Wednesday, 4 July 2018 at 14:54:41 UTC, Steven Schveighoffer
wrote:
On 7/1/18 7:36 AM, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very
similar to package.d. When you use a module 'foo' in Rust, it
can either be 'foo.rs' or 'foo/mod.rs'. If 'foo' has
sub-modules, i
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 w
On 7/1/18 7:36 AM, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very similar to
package.d. When you use a module 'foo' in Rust, it can either be
'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules, it has to be
'foo/mod.rs'.
Now in the Rust 2018 edition, they are getti
On Sunday, 1 July 2018 at 11:36:51 UTC, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very similar
to package.d. When you use a module 'foo' in Rust, it can
either be 'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules,
it has to be 'foo/mod.rs'.
Now in the Rust 2018 ed
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 package
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:
In Rust, they have something call mod.rs, which is very
similar to package.d. When you use a module 'foo' in Rust, it
can either be 'foo.rs' or 'foo/mod.rs'. If 'foo' has
sub-module
On Sunday, 1 July 2018 at 11:36:51 UTC, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very similar
to package.d. When you use a module 'foo' in Rust, it can
either be 'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules,
it has to be 'foo/mod.rs'.
Now in the Rust 2018 ed
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 t
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', which
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 ha
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 i
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 re
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 valuable
On Sunday, July 01, 2018 11:36:51 Yuxuan Shui via Digitalmars-d wrote:
> In Rust, they have something call mod.rs, which is very similar
> to package.d. When you use a module 'foo' in Rust, it can either
> be 'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules, it has to
> be 'foo/mod.rs'.
>
> Now i
On 01/07/2018 11:36 PM, Yuxuan Shui wrote:
In Rust, they have something call mod.rs, which is very similar to
package.d. When you use a module 'foo' in Rust, it can either be
'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-modules, it has to be
'foo/mod.rs'.
Now in the Rust 2018 edition, they are
In Rust, they have something call mod.rs, which is very similar
to package.d. When you use a module 'foo' in Rust, it can either
be 'foo.rs' or 'foo/mod.rs'. If 'foo' has sub-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 '
22 matches
Mail list logo