5 ms·
> So, I think is better in a type-static language to annotate the types, all the time. I agree. ((int)((int) 5) + ((int) 5)) - ((int)2) is way clearer than 5
by dllthomas 10y ago
> So, I think is better in a type-static language to annotate the types, all the time.
I agree. ((int)((int) 5) + ((int) 5)) - ((int)2) is way clearer than 5 + 5 - 2.
- mamcx 10y agoIs well understood that that apply to function/classes/types, etc.. not the non-sense example you pick. And by the way, a + b + c is not more clear than Int + Int + Int... or sum(customer, products) vs. sum(Customer, ProductArray)
- dllthomas 10y agoMy real point was that it's a spectrum. Type information should go where it clarifies and should not go where it obscures. We should omit the type from intermediate expressions when (and only when!) it will be sufficiently clear from context and it does not serve as a clearer specification of intent than your terms. I contend that this is not a special property of expressions.
- mamcx 10y agoThen we agree ;)