On Saturday, 12 May 2018 at 06:38:16 UTC, rikki cattermole wrote:

Now move Person into its own module.
Boom errors.

This is how module systems should work and everything is working correctly :)

You will not convince us otherwise.

If D treated functions, like it treats classes, then you could do this in D (see below) - and the argument to get around the problems this causes, would be to put each individual function in it's own module.

That is in essence, your proposed solution to the problem with class encapsulation in D.

============
module test;

void main() { goto wtf; }

void foo()
{

wtf: return;

    return;
}
==========

Reply via email to