Re:Your programming language is probably unproductive
by mamcx on Wednesday September 28, 2016 @06:23PM
(#12601823)
Is 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)
Re:Your programming language is probably unproductive
by dllthomas on Wednesday September 28, 2016 @07:41PM
(#12602230)
My 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.
I agree. ((int)((int) 5) + ((int) 5)) - ((int)2) is way clearer than 5 + 5 - 2.