Time to destroy Walter: breaking modules into packages
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jun 5 23:25:59 PDT 2013
On Thursday, June 06, 2013 08:09:38 Max Samukha wrote:
> On Thursday, 6 June 2013 at 02:36:12 UTC, Jonathan M Davis wrote:
> > But I believe that package level access only works on the same
> > level, so you
> > couldn't have separate modules for compressing and
> > decompressing as was being
> > suggested.
>
> 'package' should be fixed so that 'package' declarations are
> accessible within nested packages.
Well, it _is_ debatable as to whether that's desirable or not. With the
current behavior, you can have a package which shares stuff within itself but
not with its sub-packages, but there's no way to share with the sub-packages
without making the symbols public; whereas if sub-packages have access to
their parent packages' package functions, then packages _can_ share with their
sub-packages, but they can't restrict anything to just the package. Both ways
have their pros and cons. I don't know which is ultimately better.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list