ChanServ changed the topic of #nmigen to: nMigen hardware description language · code at https://github.com/nmigen · logs at https://freenode.irclog.whitequark.org/nmigen
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #nmigen
ronyrus has quit [Quit: %me%]
ronyrus has joined #nmigen
_whitelogger has joined #nmigen
Asu has joined #nmigen
proteus-guy has quit [Ping timeout: 260 seconds]
Asu has quit [Ping timeout: 255 seconds]
Asu has joined #nmigen
Asu has quit [Quit: Konversation terminated!]
Asu has joined #nmigen
Asu has quit [Remote host closed the connection]
Asu has joined #nmigen
cr1901_modern has quit [Read error: Connection reset by peer]
cr1901_modern has joined #nmigen
Sarayan has quit [Ping timeout: 272 seconds]
proteus-guy has joined #nmigen
Sarayan has joined #nmigen
<anuejn> what do you think about having a convention of defining the signals of a nmigen module as class variables?
<anuejn> is there anything stupid in doing so?
<ZirconiumX> Maybe I'm misunderstanding, but don't we do that already?
<anuejn> well till now i always used instance variables
<anuejn> ah but i made some fuckup in my head
<anuejn> if i have `class A: x = 10`
<anuejn> inst = A()
<anuejn> inst.x = 20
<anuejn> when i refer to inst.x now, am i refering to a instance variable x, which is shadowing the class variable x?
<vup> anuejn: yes I think thats how that works
<vup> also I think one of the main problems with using class variables is Signals whose properties (like width) depends on constructor arguments
<anuejn> well, we could just declare the type in the class variable to express the intent that this is a public facing signal
<anuejn> but you are right, that this is not ideal
<anuejn> since we also dont have "rich" signal types atm, which could express direction or size
<vup> yeah, currently I don't really see a benefit compared to adding a docstring, which seems a bit clearer to me
<awygle> If you use class variables you'll get the same instance of the variable each time you elaborate an instance of the module
<awygle> Which is almost certainly not what you want and may break nmigen? Idk haven't tried it
Asu has quit [Quit: Konversation terminated!]