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

As a native English speaker I'd say that's spot on. In particular, at least in British English, 'when' is never paired with 'else' - you might instead pair 'until' and 'when' and I suppose one could contort oneself into making a case for those keywords to create havoc!


Also a native english speaker.

I was about to disagree with you, that we use "when" when several things might be true, but then I realised that in those cases each of the possibilities will happen, but at different times, like "when the light is read you stop, when it is green you go".

It's fascinating how many quite subtle rules you internalise about your native language without realising it.


We even have little jokes based on the subversion of this expectation.

Developers will stop arguing about arbitrary syntactical nuances when pigs fly!


How about

  when light_is_green {
     go
  } when light_is_red {
     stop
  } otherwise {
     go_very_fast
  }
:)


‘If’ is never really paired with ‘else’ in natural language either.




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

Search: