4 ms·
There are two things I can think of: 1. Static typing can help in reducing the function name. 2. Programming Languages give us means of combinations and abstr
by babarock 14y ago
There are two things I can think of:
1. Static typing can help in reducing the function name.
2. Programming Languages give us means of combinations and abstractions in order to avoid that exact problem.
For example:
class RMG_Serialize inherits Serializor:
router_msg_header rmg
xml_utf8 utf8() {
...
super(this.rmg)
...
}
}
The example is not perfect, the function is not exactly globally visible, but I could argue that instanciation of the class is available globally. Or you could get by, by making it static. Also, it's true that I'm adding more characters than any other function name, but no single word I wrote has more than 13 character keeping it easy to read. Every subsequent call to this function will be nothing more than `RMG_Serialize().utf8()`.
Imho, if you feel you're forced to give this kind of name to your variables, there's something wrong either with the design or with the specs.
The choice of programming language counts as well. I mentioned static typing as the obvious example, but isn't a language nothing more than a framework to name your variables?
But I agree with you that maintaining your names short is difficult. I think this has less to do with technical limitations and more to do with project management issues. Generally, I think that a team that understands the value of refactoring (and manage to afford it) will always be better at avoiding this crippling problem.