title: Is it useful to select none with D3, and how?
body: <p>I want a call to <code>d3.selectAll</code> to return nothing. It seems like this should be a common pattern, something like - </p>
  
  <pre><code>d3.selectAll(false) // maybe?
  .data([10,20,30])
  .enter()
  // ... manipulate
  </code></pre>
  
  <p>Which would require a selector returning nothing. In particular this seems to be an issue in <a href="http://bl.ocks.org/mbostock/3887193" rel="nofollow">this implementation of a donut chart</a> - </p>
  
  <pre><code>var g = svg.selectAll(".arc")
    .data(pie(data))
  .enter().append("g")
    .attr("class", "arc");
  </code></pre>
  
  <p>This is evil because "arc" is a global class that could be used somewhere else in the webpage and this is library code. Yet there's no good way to articulate the thing we're trying to select. The arc class? This is obviously a kludgey use of class and has this side effect. I can't say "arc" because they're just paths which are too general, although <a href="http://bost.ocks.org/mike/join/" rel="nofollow">that's what's used in this example, only with circles</a>.</p>
  
  <p>So seems to be a hanging point.</p>