2 ms·
Apple's Swift makes more sense with its curry feature. If you have class 'C' with method 'm' taking argument 'x', you can call that method either like c.m(x) or
by oleganza 12y ago
Apple's Swift makes more sense with its curry feature. If you have class 'C' with method 'm' taking argument 'x', you can call that method either like c.m(x) or C.m(c, x) because C.m is automatically provided closure taking instance of C (typically as "self") and argument x.
Most importantly, there is no magic going on with namespaces. Method 'm' still belongs to its class's namespace.