Member since
I think this syntax is not good. Just quickly scanning the code visually might give you a wrong impression if you just see the keyword private
.
I prefer the syntax of kotlin a lot more which would look like this:
class Foo { public string $bar = 'baz' { private set; protected get } }
For some reason this website messes with the markdown. Image the additional two lines for the setter and getter both to be indented one more time than the public
keyword. So with a total of 8 spaces in front.
Makes it just cleaner
Since I'm working also with Kotlin I desperatly crave for a feature like this. At least if it is as powerful as in Kotlin where I could e.g. change the setter to be protected or private while the getter can be public
Multi-inheritance seems to be the hot topic that prevented this RFC from being approved even though it was not the RFC target. Multi-inheritance is an afterthought that may or may not be abused with this change. What we want would actually be just the convenience of doing what Traits already allow while reducing potential BC break impact coming from interface changes. There are interfaces originated from the interface segregation mindset that often has only 1 implementation and could very well take advantage of default implementation for a simpler system design.
I wrote down some thoughts on this RFC on my blog. I think it's worth rethinking our current definition of what "an interface" is. Especially since many languages are interface default methods as their way of multi-inheritance.