Sealed classes - would you want them in D? (v2)
Grady Booch
gb at gb.com
Wed May 23 02:28:58 UTC 2018
On Wednesday, 23 May 2018 at 02:23:31 UTC, Bjarne Stroustrup
wrote:
>
> This is NOT why I created C++ - just so you programmers could
> violate an objects autonomy!
>
> No other type gets treated this way in D.
Good on you Bjarne. Someone has to stick up for the class.
We're with you Bjarne.
While you can't encapsulate a class in D anymore, you can at
least do this:
=============
module test;
import std.stdio : writeln;
import std.range : iota;
void main()
{
writeln = iota = 5;
}
=============
The software of the future is doomed!
More information about the Digitalmars-d
mailing list