I believe these are responses to Jikes' complaining about shadowed instance variables.



No doubt - I'm not sure that Jikes should dictate the code.

Likewise, I do not see converting an if-else to a
ternary conditional makes the code clearer - on the contrary it makes it
more convoluted.


Ternary conditionals are one of my favorite things.  I
riddle the code with them in the interest of making it
smaller... surely it doesn't raise the barrier of
entry to understanding Ant's code _that_ much?  :)


No, not *that* much but it's not really necessary. As an example, I personally find in the following, the original code is *much* clearer in intent and even in formatting.


-        if (callee != null) {
-            return callee.handleInput(buffer, offset, length);
-        } else {
-            return super.handleInput(buffer, offset, length);
-        }
+       return (callee != null ?
+                       callee.handleInput(buffer, offset, length) :
+                               super.handleInput(buffer, offset, length)
+                       );

Personally, I primarily use terneraries for situations such as parameter passing, where I need to pass one of two values. In general, I much prefer readable code with good variable names over smaller code with abbrv vrbl nms.

Conor


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



Reply via email to