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

2019-05-28 Thread Eric V. Smith
> On May 28, 2019, at 5:22 PM, Yanghao Hua wrote: > >> On Tue, May 28, 2019 at 10:40 PM Eric V. Smith wrote: >> >>> On 5/28/2019 4:29 PM, Yanghao Hua wrote: >>> >>> To repeat what the problem do I think I am solving? A variable, that >>> behaves like an integer (e.g. all normal integer ops

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

2019-05-28 Thread Greg Ewing
Yanghao Hua wrote: a different assignment behavior in HDL is your assignment does not take effect until a delta cycle of zero virtual time has passed. (did you really looked at the previous postings? :) You need to understand that most of the people reading this are not familiar with the

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

2019-05-28 Thread Ricky Teachey
There are no descriptors in the example you gave. You are writing example code of how you WANT it to work, or wished it would work. Please write a descriptor that ACTUALLY overrides = (using __set__) and does what you want it to do, and then use it in an actual example. It may not look the way

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

2019-05-28 Thread Yanghao Hua
On Tue, May 28, 2019 at 10:46 PM Ricky Teachey wrote: > > I don't want to pile on, but: you have also not given any actual reason why > overloading the = operator using descriptors: > > stuff.a = 8 > > ...is not sufficient, other than a general "well I don't like that". Come on, > guy. If you

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

2019-05-28 Thread Yanghao Hua
On Tue, May 28, 2019 at 10:38 PM Chris Angelico wrote: > > On Wed, May 29, 2019 at 6:30 AM Yanghao Hua wrote: > > > > > You do realise that repeatedly avoiding the question "what problem do > > > you think you are solving?" does not convincingly make the case that > > > there is a problem to be

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

2019-05-28 Thread Yanghao Hua
On Tue, May 28, 2019 at 10:40 PM Eric V. Smith wrote: > > On 5/28/2019 4:29 PM, Yanghao Hua wrote: > > > To repeat what the problem do I think I am solving? A variable, that > > behaves like an integer (e.g. all normal integer ops should just > > work), but has a different assignment behavior,

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

2019-05-28 Thread Ricky Teachey
I don't want to pile on, but: you have also not given any actual reason why overloading the = operator using descriptors: stuff.a = 8 ...is not sufficient, other than a general "well I don't like that". Come on, guy. If you can't give a real actual reason why that won't work for HDL programming,

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

2019-05-28 Thread Eric V. Smith
On 5/28/2019 4:29 PM, Yanghao Hua wrote: To repeat what the problem do I think I am solving? A variable, that behaves like an integer (e.g. all normal integer ops should just work), but has a different assignment behavior, such that it can be used to develop equally good hardware descriptions.

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

2019-05-28 Thread Chris Angelico
On Wed, May 29, 2019 at 6:30 AM Yanghao Hua wrote: > > > You do realise that repeatedly avoiding the question "what problem do > > you think you are solving?" does not convincingly make the case that > > there is a problem to be solved, don't you? > > It might be that I am not good enough yet to

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

2019-05-28 Thread Yanghao Hua
> You do realise that repeatedly avoiding the question "what problem do > you think you are solving?" does not convincingly make the case that > there is a problem to be solved, don't you? It might be that I am not good enough yet to present it in a way for some of you to better comprehend it.