Names for meta variables
Meta - variables are substitute words that are used in technical texts to mean something that can stand in their place, meta-variables are often used in programming.
There are two legendary meta variables - this
A huge number of programmers are sitting on this resource and I would like to suggest abandoning the tradition of using baz and bat as a meta variable name, and also discuss the possibility of replacing them with something else.
I understand that this is already rooted as a tradition, but still, I do not understand where this tradition came from. In large blocks of code, where two or three similar variables are constantly used, confusion begins to arise, you have to read every letter.
The proposal was made after discussion in the topic " JavaScript. The kernel ."
Why not come up with a foo-bar another set of names that would meet the following conditions:
- Length - three letters
- Dramatically different in appearance
- Dramatically different in pronunciation
- Easy and clearly pronounced. There must be 1 syllable.
For example, I suggest the following set:
Listen
Quux used since it is the traditional fourth variable, and sounds, IMHO, better than qux. But at the same time, it is knocked out of the "rhythm" of three-letter variables.
Of course, at first they will be unusual, but over time a set of different meta-variables that look good in the code will settle down. I would like to hear your opinion.
There are two legendary meta variables - this
foo
and bar
. They are beautiful - short, of the same length, different from each other, easy to pronounce. But if we need more meta variables? There are no clear rules. Commonly used are baz and bat. But they have a significant drawback - a very similar spelling with bar. And even more similar sound (during performances, deaf letters at the end are often eaten up and it turns out “ba” instead of “bar” and “baht”)var foo = 'fooValue',
bar = 'barValue',
baz = 'bazValue',
bat = 'batValue';
A huge number of programmers are sitting on this resource and I would like to suggest abandoning the tradition of using baz and bat as a meta variable name, and also discuss the possibility of replacing them with something else.
I understand that this is already rooted as a tradition, but still, I do not understand where this tradition came from. In large blocks of code, where two or three similar variables are constantly used, confusion begins to arise, you have to read every letter.
The proposal was made after discussion in the topic " JavaScript. The kernel ."
Why not come up with a foo-bar another set of names that would meet the following conditions:
- Length - three letters
- Dramatically different in appearance
- Dramatically different in pronunciation
- Easy and clearly pronounced. There must be 1 syllable.
For example, I suggest the following set:
foo // фу
bar // бар
qux // куикс (читать как quux)
osе // оуз
rol // рол
zed // зэд
Listen
Quux used since it is the traditional fourth variable, and sounds, IMHO, better than qux. But at the same time, it is knocked out of the "rhythm" of three-letter variables.
var foo = 'fooValue',
bar = 'barValue',
quux = 'quuxValue',
ose = 'oseValue',
rol = 'rolValue',
zed = 'zedValue';
// vs
var foo = 'fooValue',
bar = 'barValue',
qux = 'quxValue',
ose = 'oseValue',
rol = 'rolValue',
zed = 'zedValue';
Of course, at first they will be unusual, but over time a set of different meta-variables that look good in the code will settle down. I would like to hear your opinion.