DM Smith wrote:
I simply meant that the change that is being made should be done in such a way that one applying the patch can readily see what is being changed. The most common case of unnecessary change is that of whitespace. Changing indentation, changing the placement of curly braces, reordering methods and variables and so forth are all unnecessary.

[snip]
Such a change is most likely unnecessary.
Others, probably including me, would disagree. Changes to make the source have a consistent style and a consistent layout are not uncommon. Look through the Linux kernel change logs for "whitespace clean up" (or "white space" and "cleanup", spaces are optional :-)). The GNU glibc maintainers will reject patches that do not conform to the coding style for glibc -- and that includes stylistic choices like the ones you mentioned (that I cut in the interests of brevity).

Style may make no functional difference to the code but it does affect maintainability. It may well also affect correctness. You could declare all your variables as "Object" and simply cast to the right type to get the method you want. There would be no functional difference (one could argue that eliminating run-time type checking is merely an optimisation) but would you seriously want to code this way.

Similarly, and I'm struggling to keep vaguely on-topic here, the Java 1.5 iteration constructs are functionally no different to their 1.4 equivalent. But to dismiss the 1.5 changes as "syntactic sugar" or "fluff" is to denigrate their importance to the reliability and maintenance of software. If you declared all your variables as "Object" would your code be more reliable, about the same or less? (That's a rhetoric question, I hope.)

jch

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to