3 ms·
Concerning the example with the outstanding orders, I think the main problem in practice is not so much the poor naming of the variable, but the lack of documen
by tralarpa 6y ago
Concerning the example with the outstanding orders, I think the main problem in practice is not so much the poor naming of the variable, but the lack of documentation of the called function ("Process" in this case). I could live with the variable name "outstanding", but the IDE should better show me a good explanation of what the function "Process" is doing when I point with my mouse on it.
The example is also a good example why type declarations are so helpful. Just by looking at the lines "var outstanding = GetOutstandingOrders()" or "var allOutstandingOrders = GetOutstandingOrders()", I could not tell whether the function is returning a list of outstanding orders or whether it has a side effect (reading the outstanding orders into a buffer) and returning a boolean indicating that there are outstanding orders.