georgetso
V2EX  ›  Swift

inout 和 mutating 的区别有哪些?

  •  
  •   georgetso · Aug 7, 2014 · 4856 views
    This topic created in 4376 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   ·   2763 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:29 · PVG 21:29 · LAX 06:29 · JFK 09:29
    ♥ Do have faith in what you're doing.