title: Should I ever prefer Enum to Stream in Elixir?
body: <p>This may sounds like I'm begging to start a flame war, but hear me out.</p>
  
  <p>In some languages laziness is expensive. For example, in Ruby, where I have the most recent experience, laziness is slow because it's achieved using fibers, so it's only attractive when:</p>
  
  <ul>
  <li>you must trade off cpu for memory (think paging through large data set)</li>
  <li>the performance penalty is worth it to hide details (yielding to fibers is a great way to abstract away complexity instead of passing down blocks to run in mysterious places)</li>
  </ul>
  
  <p>Otherwise you'll definitely want to use the normal, eager methods.</p>
  
  <p>My initial investigation suggests that the overhead for laziness in Elixir is much lower (<a href="https://www.reddit.com/r/elixir/comments/31odpb/stream_vs_enum_benchmark/" rel="noreferrer">this thread</a> on reddit backs me up), so there seems little reason to ever use Enum instead of Stream for those things which Stream can do.</p>
  
  <p>Is there something I'm missing, since I assume Enum exists for a reason and implements some of the same functions as Stream. What cases, if any, would I want to use Enum instead of Stream when I could use Stream?</p>