Closed Diego-Ivan closed 9 months ago
Can you mention the preference between properties and methods?
ie window.title = "foo"
versus window.set_title("foo")
It is mentioned in the parent section as a general preference. Though, from what I can tell from the demos, that is not the preferred style for Python. In that case I think it should also be added to the JavaScript subsection and removed as a general guideline.
Agree - could you take care of it in this PR? I'm not too convinced we should update the current style for Vala which currently seems to prefer getter/setters. WDYT?
Agree - could you take care of it in this PR?
Sure
I'm not too convinced we should update the current style for Vala which currently seems to prefer getter/setters. WDYT?
Not sure if that's the case. At least all of the demos that I've ported use properties instead of getter/setters. From a quick glance to most of them I could tell that just the first demos that were ported use getters/setters (i.e #99, #106, #107 and #83), but those also don't follow other guidelines such as string formatting and C-Style casting. I can take care of improving those demos and address other issues they have later, so I think that properties should be preferred over getters/setters for Vala IMO.
My mistake then :+1: