Why is this code using the global $user variable? This is the code used by someone:

/**
 * @Implement of hook_comment()
 */
function mycaptcha_comment(&amp;$comment, $op) {
  global $user;
  switch ($op) {
    case 'insert':
      if (isset($_SESSION['mycaptcha_ask_key'])) {
        // unset the information
        unset($_SESSION['mycaptcha_ask_key']);
      }
    break;
    case 'validate':
      if ($comment['mycaptcha_ask']) {
        // validate the information
        mycaptcha_ask_form_validate($comment['mycaptcha_ask']);
      }
    break;
  }
}


On the above code, why is he using global $user;? I see he doesn't use $user in his code.
The code is not really using the global $user variable. Probably, the code was first using it, and that line has been left; it could also be the code using it was moved in mycaptcha_ask_form_validate(). 

As that line is just a variable declaration, there is no problem in leaving it, even if I generally remove it.