On 18-03-15 16:57, Andrea Aime wrote:
On Wed, Mar 18, 2015 at 4:51 PM, Niels Charlier <[email protected] <mailto:[email protected]>> wrote:

    In my change you can clearly see in the if block when the filter
    is needed and why, and it is not created otherwise. That is much
    more logical and readable.


We can agree to disagree here... the core is more correct, I don't find it more readable, of course we have different ways to approach code and so on, but believe your statement is just a matter of personal taste (as such, I advise to better qualify how things are not readable for other people
to understand your point of view).

Don't think it is personal taste. First, you are creating something that is not needed and thereby waste memory and time. Even though something as small as that doesn't matter any more in modern computer systems, it is bad code practice. Second, the third party reader must put two things together that are in a different place in the code and aggregate them logically to understand the real condition: "if (rootAccess) { ...} else {...}" and later "if (wsAccess != rootAccess) {" . Third, this separation of the condition in the code is what introduced the bug which proves the point, and it would more likely create bugs in later edits because the logic is spread around.

Regards
Niels
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to