title: what to choose between require and assert in scala
body: <p>Both <code>require</code> and <code>assert</code> are used to perform certain checks during runtime to verify certain conditions.</p>
  
  <p>So what is the basic difference between them?</p>
  
  <p>The only one I see is that <code>require</code> throws <code>IllegalArgumentException</code> and <code>assert</code> throws <code>AssertionError</code>.</p>
  
  <p>How do I choose which one to use?</p>