title: Choosing between naming conventions and semantics with Node.js module imports
body: <p>When importing modules in Node.js, it's fairly common (and greatly aids in readability) to use capitalization when importing classes and camel case when importing anything else:</p>
  
  <pre><code>let Transform = require('stream').Transform;
  let util = require('util');
  let fs = require('fs');
  </code></pre>
  
  <p>And yet, imported modules really should be constants, as it makes little sense to allow the value of a function or class from an imported module to change:</p>
  
  <pre><code>const Transform = require('stream').Transform;
  const util = require('util');
  const fs = require('fs');
  </code></pre>
  
  <p>But naming conventions would dictate that constants should always use all caps and underscores:</p>
  
  <pre><code>const PI = 3.14159265358979;
  const AVOGADRO_NUMBER = 6.02214086e23;
  </code></pre>
  
  <p>So therein lies a conflict: It is typically semantically confusing to use all caps and underscores in naming imported modules, and yet it is semantically illogical to not make an imported module, class, or function a constant.</p>
  
  <p>So either imported modules should use all caps and underscores, sacrificing some readability and knowledge of which role (function/variable or class) is filled by the imported module:</p>
  
  <pre><code>const RIEMANN_ZETA = require('riemann-zeta');
  let nonTrivialZero = RIEMANN_ZETA(s);
  </code></pre>
  
  <p>Or imported modules should use camelCase or capitalization based on role, sacrificing congruence between constant status and notation:</p>
  
  <pre><code>const riemannZeta = require('riemann-zeta');
  let nonTrivialZero = riemannZeta(s);
  </code></pre>
  
  <p>Or imported modules should be imported as non-constant, maintaining all naming conventions but sacrificing logical use of modules as immutable once imported:</p>
  
  <pre><code>let riemannZeta = require('riemann-zeta');
  let nonTrivialZero = riemannZeta(s);
  </code></pre>
  
  <p><strong>Which makes the most sense?</strong></p>