On Fri, 5 Mar 2021, 9:10 pm Steven D'Aprano, wrote:
> I was curious how and why return annotations use the arrow `->` symbol,
> so I went spelunking into the depths of the Python-Ideas and Python-Dev
> mailing lists.
>
> Much to my surprise, I couldn't find any discussion or debate about it.
>
I
Haskell and the MLs are older than I am and use "->" to mark their function
types (their functions are curried, but it clearly counts). Given the
overall influence functional languages have had on modern typing, their
influence making itself felt here would be unsurprising.
On Sat, 6 Mar 2021 at 0
On Fri, 5 Mar 2021 16:45:25 -0800
Guido van Rossum wrote:
> Good question. I don't think anyone has ever asked this before... Given the
> variants you propose, I'd say that the 3-character ones would be more
> effort to type without real benefits, and `=>` would at the time (and
> perhaps still :
Good question. I don't think anyone has ever asked this before... Given the
variants you propose, I'd say that the 3-character ones would be more
effort to type without real benefits, and `=>` would at the time (and
perhaps still :-) be seen as too close to `>=`.
Could it be that there were alread