3 ms·
Swift does retain this, but it makes it look much more readable. The example above would be something like: orderbook.sendOrder(symbol: "foo", buy: true, qua
by int_19h 2y ago
Swift does retain this, but it makes it look much more readable. The example above would be something like:
orderbook.sendOrder(symbol: "foo", buy: true, quantity: 100, price: 1000.00);
It also has a nifty syntax for function declarations to allow decoupling the keyword from the variable name when that leads to more readable code:
func parseInt(from s: String) -> Int {
/* the variable is named 's' here */
}
parseInt(from: "123")