Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Their point seems to be in the mismatch of names. Imagine seeing this sequence, with names instead of numbers:

  switch(HTTP_METHOD) {
    case PUT: processPut(...);
    case POST: processPost(...);
    case GET: processDelete(...); // wtf
    case DELETE: processGet(...); // mate?
  }
To the reader that appears to be an error even if it is precisely the thing you want to happen.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: