Heim  >  Fragen und Antworten  >  Hauptteil

ruby 的 Block 调用为什么用 yield 这个单词?

ruby 的 Block 调用为什么用 yield 这个单词,这个单词本身的意思没有 invoke 的意思啊?想不明白,苦思好久了,真难受

迷茫迷茫2710 Tage vor597

Antworte allen(1)Ich werde antworten

  • 黄舟

    黄舟2017-04-24 09:12:08

    因为Block是个coroutine啊,从coroutine里做upcall术语就是yield啊。

    Antwort
    0
  • StornierenAntwort