Nicknaming

(from: from-new.js @ fb19155, lines 144 ‒ 199)

In some cases, where there is a long set of identifiers required to access a particular value is too long for my likings, I’ll assign the value to a throwaway “nickname” simply to make it clearer what the purpose of the value being defined is.

Here, I move the necessitated “long name” to the far right-hand-side of the block of code, but on the previous evaluated line, to take it out of the reader’s path: they won’t notice it when skimming the code along the left edge, as most do.

(It’s far further to the right in the actual implementation; I re-aligned it for this shot, to make it visible inside 400 pixels’ width.)

More by ELLIOTTCABLE

View profile