3 ms·
You could also make a single-letter alias: auto& r = rectangle; r.width(100); r.height(100); I like to use very short variable names(single or 3 l
by MichaelBurge 5y ago
You could also make a single-letter alias:
auto& r = rectangle;
r.width(100);
r.height(100);
I like to use very short variable names(single or 3 letters at most) but fully write out the type:
Rectangle r;
Which is similar in spirit to aliasing the variable.
"Rectangle" is probably not a good example, because rectangles are pure data used for many different purposes. So "rectangle" is often a poor variable name. But many programs use 1 type for 1 purpose, and then the type alone is enough.