Re: Checking directory state using Groovy
OCsite <[email protected]>
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <[email protected]> |
James, > On 20. 10. 2021, at 13:18, James McMahon <[email protected]> wrote: > One thing I've been thinking about recently is whether these refinements always make things easier to read and maintain, or more cryptic and difficult? Some groovy things I've seen sometimes make it a little more difficult to unwrap what the code is doing. But as I said, I suspect that's more a function of my lack of experience rather than a Groovy problem. Depends on the writer of course. Groovy gives you a pretty powerful gun; it is up to you whether you hunt more efficiently or shoot your own leg :) That said, the property access MG mentioned is essentially always beneficial; I can't think of any place where “foo.bar” would be worse than “foo.getBar()”, not speaking of “foo.bar++” compared with “foo.setBar(foo.getBar()+1)”, etc. There used to be a style guide amongst the documentation somewhere, let me see... here you are: http://groovy-lang.org/style-guide.html Worth definitely reading, and in most cases embracing (of course you don't have to :)) All the best, OC