New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] get rid of that +=
and .eq()
#608
Comments
The left-hand side of
This is not representable with the syntax you're suggesting. (Aside from that, this proposal violates Python name scoping in a way far more substantial than what nMigen already does, but that's a secondary issue compared to the one above.) |
@whitequark how about this approach: m-labs/nmigen#345? I created the issue in the wrong repository by mistake. |
Personally, we find that this sort of change obscures important details about what's actually occurring when you assign a signal in a domain like this. You're adding a new assignment statement and the code itself should reflect that. Beyond the potential implementation issues, this fact becomes important because later assignments can override earlier assignments that have been added. |
The proposal as submitted has a fatal issue: it makes a substantial amount of existing code unrepresentable. The proposal as modified later has a fatal issue: the code style it proposes makes it impossible to reuse the decision trees built through |
replace
m.d.<domain> += <target>.eq(<val>)
withm.d.<domain>.<target> = <val>
implementation as runtime fix:
why?
pros: none, just a semantics fix
cons:
__setattr__
looks like a dirty hack that can create problems in the futurem.<target> = Signal(...)
prior tom.d.<domain>.<target> = <value>
The text was updated successfully, but these errors were encountered: