Open RFCs

Asymmetric Visibility v2

A new syntax for declaring the “set” operation visibility of an object property

28% 72%
20
16 yes
42 no
new MyClass()->method() without parentheses

Chain method on newly created objects without parentheses

86% 14%
54
95 yes
16 no
Property Hooks

A new way of interacting with properties

61% 39%
70
141 yes
90 no

Argument of the Day

1

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.

Share:
Read the RFC: Asymmetric Visibility v2 eydamos avatar
eydamos
voted no
RSS Feed Contribute Watch on YouTube Our License
© 2024 RFC Vote. This project is open source. Contribute and collaborate with us!