Differences between なり and 〜たとたん


I just found out `〜たとたん`, meaning "as soon as"; I already knew `なり` with
(apparently) the same meaning:

> 今度は横になるなりほぼ即座に寝ついていた
>
> As soon as I lay down, I almost immedialy fell asleep
>
> 「ミキちゃん、どこにいたの。心配したよ」と言ったとたん、ミキは泣き出した
>
> As soon as I asked "Where were you, Miki? I was worried", Miki started
> crying

I tried figuring out what's different, if anything, between these forms, but I
can't find `なり` in my grammars and the only thing comparing the two I found is
[this](http://maggiesensei.com/2018/04/20/how-to-use-%E3%81%AA%E3%82%8A-nari/)
page, which says they are similar, it doesn't explain why, beside saying one
asks for dictionary form and the other for short past.

Edit: Also, not sure about the differences between `〜たとたん` and `〜たとたんに`.




I think なり is more nuanced. I found there is [an article about
this](https://eprints.lib.hokudai.ac.jp/dspace/bitstream/2115/45652/1/BISC009_001.pdf),
but I was not very satisfied with his investigation, so the following is
basically my own observation.

なり indicates the first verb is either a trigger or a precondition of the
second verb. The subject is waiting for, or at least anticipating, the
realization of the first event. The first verb is often related to movement
(入る, 座る, 戻る) or perception (見る, 聞く), and the second verb is related to
someone's emotion or deliberate action.

>   * 私が部屋に入るなり、彼が話しかけてきた。  
>  (He was waiting for me.)
>   * 犯人は警察の姿を見るなり逃げ出した。  
>  (The criminal was thinking he might encounter the police.)
>   * 私の顔を見るなり、彼は泣き出してしまった。  
>  (He was already feeling sad, but seeing my face was the final trigger for
> his crying.)
>   * 彼女は家に着くなり寝てしまった。  
>  (Tends to be used when the narrator knew she was tired and sleepy on her
> way home.)
>

とたん is more neutral and generic. In particular, とたん should be used when the
second verb refers to an incidental or unexpected event that is not directly
related the first event.

>   * 私が勉強を始めたとたん、彼が話しかけてきた。  
>  (He was probably not waiting for me to start studying; the two events
> happened at the same time by chance.)
>   * 私が部屋に入ったとたん、部屋の明かりが消えた。  
>  (The second event is an unexpected event that may or may not be related to
> the first one.)
>   * 彼女は家に着いたとたんに寝てしまった。  
>  (Tends to be used when this was unexpected to the narrator.)
>

I think に after とたん is purely optional.




I think なり is more nuanced. I found there is [an article about
this](https://eprints.lib.hokudai.ac.jp/dspace/bitstream/2115/45652/1/BISC009_001.pdf),
but I was not very satisfied with his investigation, so the following is
basically my own observation.

なり indicates the first verb is either a trigger or a precondition of the
second verb. The subject is waiting for, or at least anticipating, the
realization of the first event. The first verb is often related to movement
(入る, 座る, 戻る) or perception (見る, 聞く), and the second verb is related to
someone's emotion or deliberate action.

>   * 私が部屋に入るなり、彼が話しかけてきた。  
>  (He was waiting for me.)
>   * 犯人は警察の姿を見るなり逃げ出した。  
>  (The criminal was thinking he might encounter the police.)
>   * 私の顔を見るなり、彼は泣き出してしまった。  
>  (He was already feeling sad, but seeing my face was the final trigger for
> his crying.)
>   * 彼女は家に着くなり寝てしまった。  
>  (Tends to be used when the narrator knew she was tired and sleepy on her
> way home.)
>

とたん is more neutral and generic. In particular, とたん should be used when the
second verb refers to an incidental or unexpected event that is not directly
related the first event.

>   * 私が勉強を始めたとたん、彼が話しかけてきた。  
>  (He was probably not waiting for me to start studying; the two events
> happened at the same time by chance.)
>   * 私が部屋に入ったとたん、部屋の明かりが消えた。  
>  (The second event is an unexpected event that may or may not be related to
> the first one.)
>   * 彼女は家に着いたとたんに寝てしまった。  
>  (Tends to be used when this was unexpected to the narrator.)
>

I think に after とたん is purely optional.

