title: How to create alphabet array during compile time?
body: <p>I have a function which is called quite frequently which needs the letters of the alphabet in a vector.</p>
  
  <p>To do so during runtime es quite easy:</p>
  
  <pre class="lang-rust prettyprint-override"><code>let alphabet = (b'a'..b'z').map(|c| c as char).map(|c| c.to_string());
  // Do some stuff with the alphabet...
  </code></pre>
  
  <p>Ok one can create another function creating this alphabet and then applying memorization on top of it...</p>
  
  <p>...but I have heard that rust has a powerful macro feature.</p>
  
  <p>How to create this vector - or maybe better a fixed size array with items of type <code>str</code> - during compile-time?</p>
  
  <p>In other words I do want to have something like this</p>
  
  <pre class="lang-rust prettyprint-override"><code>const alphabet: [&amp;'static str; 26] = ["a", "b", ...];
  </code></pre>
  
  <p>auto generated.</p>
  
  <p>Or is it better not to concern about this kind of optimization because the compiler does this anyway?</p>