title: Java SafeVarargs annotation, does a standard or best practice exist?
body: <p>I've recently come across the java <code>@SafeVarargs</code> annotation. Googling for what makes a variadic function in Java unsafe left me rather confused (heap poisoning? erased types?), so I'd like to know a few things:</p>
  
  <ol>
  <li><p>What makes a variadic Java function unsafe in the <code>@SafeVarargs</code> sense (preferably explained in the form of an in-depth example)?</p></li>
  <li><p>Why is this annotation left to the discretion of the programmer? Isn't this something the compiler should be able to check?</p></li>
  <li><p>Is there some standard one must adhere to in order to ensure his function is indeed varags safe? If not, what are the best practices to ensure it?</p></li>
  </ol>