groovyfx-project / groovyfx

A library for writing JavaFX 8 applications in the Groovy language.
http://groovyfx.org
Apache License 2.0
199 stars 48 forks source link

Remove public modifier from groovy methods #67

Open dustinkredmond opened 3 years ago

dustinkredmond commented 3 years ago

Groovy methods don't need the public modifier, as they're public by default. This commit removes the public from each method where it is not needed.

Dierk commented 3 years ago

looks good to me. It is important not to remove the public keyword from e.g. field/property declarations but that seems to be observed. The change makes the code more idiomatic, yet less explicit. I'm undecided whether that is an improvement.

aalmiray commented 3 years ago

I'm undecided as well. I hope this is not part of the Hacktoberfest event, in which case and if the contribution has merit then it'll be merged after Hacktoberfest has ended.

dustinkredmond commented 3 years ago

@Dierk I agree that it does make it less explicit, although seeing public throughout 95% of the Groovy classes does make it far less idiomatic, and less (no pun intended) Groovy. I'm seeing more and more projects, especially new ones, that have adopted dropping the unnecessary public modifier, and was hoping that groovyfx will be able to contend with these going forward, as it looks like JavaFX is here to stay.