docs icon indicating copy to clipboard operation
docs copied to clipboard

Improvement of chapter "Výrazové prostředky" - updated version

Open mildabre opened this issue 1 year ago • 0 comments

The term 'výrazové prostředky' is correct, but common developer understands the word "syntaktické prvky" better. I also suggest reordering the items + complete missing description about public properties and explicite note the slight syntax difference between constant and property.

I was very confused by that fact, that approx. 3 years ago the syntax for public properties @myService::publicProperty was not supported and the only supported syntax at that time was funny: @myService::$publicProperty() so I have it in my services.neon. Another source of confusion is neon plugin of @mesour which suggests public properties with $ on the beginning.

When I tested yesterday the syntax @myService::publicProperty I made first letter uppercase @myService::PublicProperty and got exception that constant not exist. I see that the difference in syntax between constant and property is very slight - first letter uppercase/lowercase. I think its goodidea, but I see important point out this slight difference in documentation as well.

The syntax of public properties is also discussed here on forum: https://forum.nette.org/cs/36714-rfc-upravit-matouci-syntaxi-public-property-sluzby-v-services-neon

mildabre avatar Nov 04 '24 22:11 mildabre