A redundant variable is one that exists exclusively to explain its value. I strongly believe that such a variable is not only pure noise but also evil, with a very negative effect on code readability. When we introduce a redundant variable, we intend to make our code cleaner and easier to read. In reality, though, we make it more verbose and difficult to understand. Without exception, any variable used only once is redundant and must be replaced with a value.
- Posted by: Yegor Bugayenko
- Posted on: September 01 2015 09:36 EDT
A variable is a variable. It has no good or evil intent behind it. It's inanimate ffs.
Yet another piece of rhetoric designed to attract readers by the attentionally deficient.