Intentional misspellings to avoid reserved words
Posted
by
Renesis
on Programmers
See other posts from Programmers
or by Renesis
Published on 2011-03-25T19:46:09Z
Indexed on
2011/07/01
0:29 UTC
Read the original article
Hit count: 296
I often see code that include intentional misspellings of common words that for better or worse have become reserved words:
klass
orclazz
for class:Class clazz = ThisClass.class
kount
for count in SQL:count(*) AS kount
Personally I find this decreases readability. In my own practice I haven't found too many cases where a better name couldn't have been used — itemClass
or recordTotal
.
However, it's so common that I can't help but wonder if I'm the only one? Anyone have any advice or even better, quoted recommendations from well-respected programmers on this practice?
© Programmers or respective owner