13 Nov
2020
13 Nov
'20
3:56 p.m.
On 14/11/20 9:33 am, Jim J. Jewett wrote:
I *hope* this was a typo! If
case Point(x=a, y=b):
assigns to a and b (instead of x and y, as in a normal call), then that is ... going to be very easy for me to forget, and to miss even when I'm aware of it.
I don't think it is a typo, unfortunately. I share this concern, and it's one of the reasons I would prefer assignments to be explicitly marked. With case Point(x=?a, y=?b): then if you get it wrong and write case Point(?a=x, ?b=y): at least you'll get a syntax error. -- Greg