On Saturday, 3 November 2018 at 04:50:52 UTC, unprotected-entity
wrote:
On Saturday, 3 November 2018 at 00:44:15 UTC, Laeeth Isharc
wrote:
[...]
I believe that responses like this, are really just designed to
further obfuscate the point I'm trying to make, so that it
cannot progress any further.
Now, speaking of keeping an open mind....let's get back to my
point.. can we?
(q1) Why is it, that people who use D, object *so much* to the
idea of allowing (at the choice of the programmer) for a type
to have it's own private state *within* a module (so that its
private state is respected by other code also within that
module)?
Because it adds no value. Creating a new file is not expensive.
(q2)Why must a type within a module *always* have its private
state exposed to other code within the module? (the key word
here, being 'always').
Because then `friend` isn't needed.
(q3) Should a language intentionally set out to prevent a
programmer from making that choice?
Yes, given that it decreases the overall complexity of the
language.