While swimming yesterday, I saw a dolphin.

When swimming yesterday, I saw a dolphin.

Are both correct? The course book I have treats them the same.

But for me 'when' is more for habitual actions.

When walking home late at night, be careful.

Or is there no difference? Thanks!

  • 1
    When is perfectly acceptable in this context. When [I was] swimming yesterday... The other usage would be understood as when [you are] walking home... Oct 3, 2021 at 15:14
  • 4
    Does this answer your question? When should I use "when" and "while"? See also The difference between "as" "when" and "while" and As, when or while?, among others. Oct 3, 2021 at 15:50
  • 2
    Semantically, there's no practical difference between "when" and "while" here. The former means "on the occasion when I was swimming yesterday", while the latter means "during the time while I was swimming yesterday". Each entails the other.
    – BillJ
    Oct 3, 2021 at 15:54

1 Answer 1


"When" can simply mean at the time that something happened. So it is basically equivalent to "while" in the swimming examples. ("While" emphasizes that the activity lasts a period of time.)

When walking home late at night, be careful.

Yes, since there is no specific situation/time referenced here, this would normally receive a habitual reading (such that "when" can be paraphrased as "whenever"). Though perhaps less common, a "while" clause can receive a habitual interpretation as well:

  • While conducting a job interview, it is important to convey a positive attitude.

For me, using "while" rather than "when" here focuses more on the stretch of time that the interview occupies. But either is acceptable.

  • 1
    An example where they are NOT interchangeable: When/*while you fall and injure yourself, seek treatment immediately. Seeking treatment is not happening during the time span of falling, it is soon after. When works because it is the same general period of time; while does not work because it is not the same specific span of time.
    – nschneid
    Oct 3, 2021 at 15:27
  • That same "simultaneous / immediately after" distinction applies to my own examples He opened the door when I knocked and He opened the door while I knocked. Oct 3, 2021 at 15:57
  • Ok, it's clear now. Thanks for the answers!
    – Moscovite
    Oct 3, 2021 at 17:03

Not the answer you're looking for? Browse other questions tagged .