title: Scala: What's the easiest way to #include a file
body: <p>What's the easiest way to include a file in a Scala source file?</p>
  
  <p>Scala lacks first class imports and deports. I like to structure my package / project dependencies in a form of quasi multiple inheritance. For me this really helps in producing clean and effective design. I did the same thing with C# name spaces. Unfortunately neither C# nor Scala's syntax really support this methodology /strategy.</p>
  
  <pre><code>import name1.name2
  </code></pre>
  
  <p>no longer includes the name1 name-space so each level must be imported on a separate line, which rather undermines the hierarchy. And even previously a package could only inherit from one parent. The current system is very un-DRY, with constant repetition of imports. Of course I could use IDE templates, but templates are still not DRY. In my view complicated templates IDE are not a good solution (HTML / CSS for example). This strikes me as particularly bad in JavaFx / ScalaFx files where the import list is sometime longer than the class definition. So the best solution seems to be create an include file for each package with all the common imports and then</p>
  
  <pre><code>#include MeaningfulNameWithoutStops
  </code></pre>
  
  <p><strong>Do I need to write a compiler plug-in to achieve this?</strong></p>
  
  <p><strong>Or is there any thing else out there that could fulfil this functionality?</strong></p>
  
  <p><strong>Should the compiler plug-in be relatively small and straightforward project?</strong></p>