Abdulla Al Kathiri writes:

 > You have a point, but the mathematical approach of Haskell of
 > different function cases is quite readable and straight forward.

You seem to have quite missed that point, though.  The point is that
although borrowing tech from Haskell for Python is a *great* idea
(almost as yuge as "namespaces" ;-), Python is not Haskell, and will
do those things its own way.

In this case we already have a perfectly good syntax for this, it's
just that it occurs in the explicit match statement rather than
implicitly when a function is defined multiple times.

The fact that the Haskell style is often less verbose is likely to
carry zero weight.  The fact that it means two ways of doing the same
thing (one being more general and flexible), is a potential detriment,
although not always an idea killer.

Also, arguing that "other languages do this and it's fine for them"
doesn't help here for syntax -- it frequently does carry weight for
the feature itself (Haskell was mentioned more than once in advocating
some kind of match statement or expression).  You need to argue either
that "this is a common (enough) thing to do and it's so verbose that
this much more concise way of expressing it is much more readable" or
that "this is something that Python can't currently do without [some
horrible hack], and it can't really be expressed in a function, but
this syntax looks very natural in a Python program and does the job".

Nobody will hate on you for disagreeing with all that, but you'll be
more able to get things done if you present syntax proposals in those
ways.

Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/DWNEDGALXEWPELPLYYVZXWGCHCKOCFEY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to