5 ms·
So why do we have this trend of using meaningless and ambiguous identifiers, and in particular, why would you do it in example code? I thought that as an indus
by hamburglar 12y ago
So why do we have this trend of using meaningless and ambiguous identifiers, and in particular, why would you do it in example code? I thought that as an industry, we'd moved past the folly of giving things terse and unhelpful identifiers in order to save a few bytes or keystrokes.
- killtheliterate 12y agoI think the example code is written using _ to convey the similarity for those familiar with underscore/lodash. In 2015, that's most JS developers. Just hazarding a guess.
- jamesrom 12y agoYou notice that all the libraries that do this (underscore, jQuery, Lodash, et al.) offer features that are almost language features. Things so useful but generic that they could almost be integrated into the language syntax. In this case, there's also the problem that 'Stream' is already used by node.
- hamburglar 12y ago> In this case, there's also the problem that 'Stream' is already used by node. Haha, well, your grandparent would like you to know that's no reason to avoid a particular name. Module system! ;) > var BoringStream = require('stream'); > var Stream = require('highland'); Or if we like special chars, we could get really cute: > var $tream = require('highland'); It's like Stream, but, you know, blingier.