You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some things in ROHD that can be a bit verbose/redundant. For example, a simple port whose variable name and String port name are the same, and which needs a public getter, could required this kind of boilerplate:
Note the word "myPort" is written 6 times, when the intent is really "add an input port named myPort".
Dart's static metaprogramming feature (upcoming, currently experimental) could potentially help automate a lot of this so that a simple annotation, something like input('myPort') could generate all the boilerplate.
A similar strategy could apply for ports on modules and interfaces, and perhaps many other places where things are a bit verbose in the "simple common" case.
The APIs themselves are very flexible, offering more capabilities than the simple case, which is why there is repetition in simple cases.
Desired solution
Implement static metaprogramming features in ROHD to handle the simple cases, while keeping the existing APIs for less simple cases (and backwards compatibility, or for those who don't want to use the new features).
Motivation
There are some things in ROHD that can be a bit verbose/redundant. For example, a simple port whose variable name and String port name are the same, and which needs a public
get
ter, could required this kind of boilerplate:Note the word "myPort" is written 6 times, when the intent is really "add an input port named myPort".
Dart's static metaprogramming feature (upcoming, currently experimental) could potentially help automate a lot of this so that a simple annotation, something like
input('myPort')
could generate all the boilerplate.A similar strategy could apply for ports on modules and interfaces, and perhaps many other places where things are a bit verbose in the "simple common" case.
The APIs themselves are very flexible, offering more capabilities than the simple case, which is why there is repetition in simple cases.
Desired solution
Implement static metaprogramming features in ROHD to handle the simple cases, while keeping the existing APIs for less simple cases (and backwards compatibility, or for those who don't want to use the new features).
Alternatives considered
No response
Additional details
Information on Dart's static metaprogramming features:
dart-lang/language#1482
https://github.com/dart-lang/language/blob/main/working/macros/feature-specification.md
https://dart.dev/language/macros
The text was updated successfully, but these errors were encountered: