Feature request : readonly properties for classes

 

Well, I don't mean readonly in the meaning that it has in other programming languages, when you design classes visually.

But I find a bit frustrating that I can't print for instance a protected property from outside of a class. That's why I'd like also a readonly type, which is accessible from any point of the code, like a public, but it is constrained to be readonly, only for output purposes.

What do you think about this? 

 
If I get the picture right, you have protected or private property of class, which value you would like to access from outside of the class.

Why don't you make a public method which will return value of property?
 
alexvd:
If I get the picture right, you have protected or private property of class, which value you would like to access from outside of the class.

Why don't you make a public method which will return value of property?
Yes, of course it's possible, but giving it this behaviour with a special keyword wouldn't have required another method.
 
TheEconomist:
Yes, of course it's possible, but giving it this behaviour with a special keyword wouldn't have required another method.

Did you mean SET/GET?

We are thinking about it, but decision has not been made yet.

 
The point was to be readonly only from outside of the class , but to be completely writeable from the class as well from its heir classes.