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
When using the lib, I find myself wanting to access things like the parameters of a FunctionSignature.
Should either make these kinds of things public or add accessor methods to them.
Easiest would be adding pub to everything, but this might backfire when we later try to add validation as a user builds up items; as they could directly manipulate the fields. While maintaining a strict mutation pattern as we have now, sets us up better for later work in this.
So maybe adding read-only accessors to these is better?
I think read-only accessors would be better than just giving direct access to the underlying items.
Do you have an interface in mind? Do we want to implement read-only iterators or slices to the underlying items?
Slices would be easier to implement if we have the items stored in something like a vec. But we can't use other storage containers or transform the items before giving a read-only view. So in the long run iterators would give us more flexibility.
We can do slices now but change it to iterators once we have the need and release a new major version then.
When using the lib, I find myself wanting to access things like the
parameters
of aFunctionSignature
.Should either make these kinds of things public or add accessor methods to them.
Easiest would be adding
pub
to everything, but this might backfire when we later try to add validation as a user builds up items; as they could directly manipulate the fields. While maintaining a strict mutation pattern as we have now, sets us up better for later work in this.So maybe adding read-only accessors to these is better?
@DarkDrek what are your thoughts?
The text was updated successfully, but these errors were encountered: