[Python-ideas] Is there a good reason to use * for multiplication?

Mathias Panzenböck grosser.meister.morti at gmx.net
Sat Oct 13 22:25:09 CEST 2012


On 10/13/2012 07:37 AM, Greg Ewing wrote:
> Ram Rachum wrote:
>> I could say that for newbies it's one small confusion that could removed from the language. You
>> and I have been programming for a long time so we take it for granted that * means multiplication,
>> but for any other person that's just another weird idiosyncrasy that further alienates programming.
>
> Do you have any evidence that a substantial number of
> beginners are confused by * for multiplication, or that
> they have trouble remembering what it means once they've
> been told?
>
> If you do, is there further evidence that they would
> find a dot to be any clearer?
>
> The use of a raised dot to indicate multiplication of
> numbers is actually quite rare even in mathematics, and I
> would not expect anyone without a mathematical background
> to even be aware of it.
>
> In primary school we're taught that 'x' means multiplication.
> Later when we come to algebra, we're taught not to use
> any symbol at all, just write things next to each other.
> A dot is only used in rare cases where there would
> otherwise be ambiguity -- and even then it's often
> preferred to parenthesise things instead.
>
> And don't forget there's great potential for confusion
> with the decimal point.
>

I'm -1 on the whole idea.

Also why use · and not ×? I think unicode in source code is a bad idea.



More information about the Python-ideas mailing list