What's the benefits to implement swift instance methods as currying functions?
<p>I read that swift instance methods are implemented as currying function?<br>
(see <a href="http://oleb.net/blog/2014/07/swift-instance-methods-curried-functions/" rel="nofollow">http://oleb.net/blog/2014/07/swift-instance-methods-curried-functions/</a>)</p>

<pre><code>class BankAccount {
    var balance: Double = 0.0

    func deposit(amount: Double) {
       balance += amount
   }   
}

BankAccount.deposit(account)(100)
</code></pre>

<p>There are twice function call. It's not efficient. The swift compiler can optimize this simple case. But for complex inheritance, the two function call is necessary, especially for code: </p>

<pre><code>let depositor = self.dynamicType.deposit
depositor(account)(100). 
</code></pre>

<p>This is less efficient that the C++ virtual function call. In C++, there is only one function call. </p>

<p>The type of desposit is: <code>BankAccount -&gt; (Double) -&gt; ()</code>. I expect it as <code>(BankAccount, Double) -&gt; ()</code> like in C++</p>

<p>Does anybody know what's the benefit to implement instance method as currying methods? Why swift does not just implement instance method just like C++? </p>