Jeff Bay introduced the term Object Calisthenics in his book Thought Works Anthology. It is a set of good practices and programming rules that can ...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for writing this. I had not encountered
Object Calisthenics
before and there are some interesting ideas.I did not find your indention example easy to read. In fact, I only quickly understood it because I had the benefit of previous example. One thing that I feel got missed is Go has a very elegant way of traversing multi-dimensional arrays.
Perhaps a better rule for nesting is that you should nest for only one purpose. Here the nesting is about traversing a board. But if you did any logic in the middle of my loop, that often makes it more difficult to read.
However, if I were manipulating 3-D space, having three nested loops would all share the same purpose. I just don't believe you can achieve the same easy understanding if you split it up into lots of functions.
I think is much more readable the 2 nested "for cycle", if you keep going like that the next step it will be the functional programming you can choose scala or java stream, go has to be easy and simple, stop with the rules, just code buddy!
Thank you for the article, interesting read.
I was just wondering why in First class collections have you chosen to use:
instead of using type alias like:
It seems to me that it would work fine with the examples.
Are there any advantages of the approach you used?
I think there’s no difference at all. Both constructions are valid in this case.