Time to destroy Walter: breaking modules into packages
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jun 19 00:12:09 PDT 2013
On Wednesday, June 19, 2013 08:51:38 TommiT wrote:
> On Wednesday, 19 June 2013 at 06:47:05 UTC, Jonathan M Davis
>
> wrote:
> > Then just put whatever is supposed to be shared between them in
> > the package
> > that they were both in originally. package stuff is not part of
> > the public API,
> > so when you're refactoring package code, you're refactoring
> > code that you own
> > entirely, so it shouldn't be an issue if you have to rearrange
> > it a bit,
> > especially since it's all localized to a single package by
> > definition. It's
> > only when something is part of a public API that refactoring
> > becomes a
> > problem.
> >
> > - Jonathan M Davis
>
> I can't put a member function into a different file if it's
> supposed to have access to private data of its enclosing
> class/struct.
Then you can put the class in a different file. But even if you can't, I don't
think that it's worth it to complicate the package attribute any further. Even
if we lose something in the process, we really don't lose much, and since
currently, package only applies to modules directly in the same package and
not nested packages, you'd still be gaining over what we currently have.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list