What do I need to do to see that the protected is active, need a separate module?
// Source: https://tour.dlang.org/tour/en/basics/classes
class Any
{
// protected is just seen by inheriting
// classes
protected string type;
this(string type) {
this.type = type;
}
// public is implicit by the way
string getType() {
return type;
}
}
import std.stdio, std.string;
import std.uni : isWhite;
void main()
{
Any any = new Any("bu bir deneme");
any.getType.writeln("--> Split:");
any.type.split!isWhite.writeln;
any.type = "deneme";
any.type.writeln;
}/* Console Out:
bu bir deneme--> Split:
["bu", "bir", "deneme"]
deneme
*/