Is public by default an unsafe default?
NotYouAgain
NotYouAgain at gmail.com
Wed May 1 23:38:05 UTC 2024
On Wednesday, 1 May 2024 at 15:31:02 UTC, Dmitry Olshansky wrote:
> ..
> ...
> Kotlin is public by default and I enjoy it thoroughly.
Fair enough. C++, C#, and Rust are private by default, and I
thoroughly enjoy using them.
But 'enjoyment' was not part of the question ;-)
> Plus in D we can just slap private: at the top of the
> module/class.
Ah. Now I completely forgot you could do that.
module m;
@safe:
private:
// ok. now I have a much better starting point -> for 'my type'
of programming.
But still, I have to 'remember' to do these things in D... and I
keep forgetting that.
I also often forget to use const.
More information about the Digitalmars-d
mailing list