Comment by Jtsummers
5 years ago
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.
No comments yet
Contribute on Hacker News ↗