georgetso
V2EX  ›  Swift

inout 和 mutating 的区别有哪些?

  •  
  •   georgetso · Aug 7, 2014 · 4787 views
    This topic created in 4340 days ago, the information mentioned may be changed or developed.
    1 replies    2014-08-07 10:32:41 +08:00
    palxex
        1
    palxex  
       Aug 7, 2014
    你应该问共通性在哪里吧。在swift里inout只能用于形参声明,mutating只能用于函数声明,完全没有交集啊。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1229 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:52 · PVG 07:52 · LAX 16:52 · JFK 19:52
    ♥ Do have faith in what you're doing.