[Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

Ricky Teachey ricky at teachey.org
Wed May 29 10:15:15 EDT 2019


>
> but that doesn't really work. I know in my previous message I said the
> problem was the aesthetics, but on further thought there are more
> problems with it.
>

I thought about those problems myself, but are they not solved by doing all
assigning of cuntion results within some "HDL namespace"? We define that
namespace, and do all operations to variables using that ns:

ns.y = function(ns.x)

The question of what function(ns.x) returns goes away-- the ns.x object
knows what to when function is called on it, and ns.y knows what to do with
the return value of any function that makes semantic sense to be assigned
to it.

Other than the problem of "I have to remember to assign function results
into an HDL namespace, and not a regular variable" (which I agree is not
fantastic, but it certainly isn't a slam-dunk justification to add new
operators), where is the problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190529/80833e68/attachment.html>


More information about the Python-ideas mailing list