title: How to define a constant members in Scala?
body: <p>What is the correct was to define a constant such as Pi or the Golden Ratio in a Scala program?</p>
  
  <p>As an example, in C# I can do this:</p>
  
  <pre><code>class Example
  {
      public readonly static Double GoldenRatio;
  
      static Example ()
      {
          GoldenRatio = (1.0 + Math.Sqrt (5.0)) / 2.0;
      }
  }
  </code></pre>