x1aoYao
V2EX  ›  Swift

Swift 为什么要区分协议的关联类型与类的泛型?

  •  
  •   x1aoYao · Apr 20, 2021 · 2160 views
    This topic created in 1859 days ago, the information mentioned may be changed or developed.

    作为一个 Java/Kotlin 用户有点疑惑,<T>泛型的这个我明白。 那 associatedtype 区别于 generic 的是什么?类似 c++的 template 吗(不懂 c++)

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2871 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 30ms · UTC 05:16 · PVG 13:16 · LAX 22:16 · JFK 01:16
    ♥ Do have faith in what you're doing.