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
Right now we use int for component IDs. This is not ideal for a few reasons:
We don't want to have component ID arithmetic
It is not type safe, for example, for functions taking some int and a component ID, either it makes calling the function error prone or we need to make the arguments keyword-only to remove ambiguity
It we create a simple type ComponentId like:
@dataclassclassComponentId:
id: int
We can avoid these issues and have a clearer interface.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Right now we use
int
for component IDs. This is not ideal for a few reasons:int
and a component ID, either it makes calling the function error prone or we need to make the arguments keyword-only to remove ambiguityIt we create a simple type
ComponentId
like:We can avoid these issues and have a clearer interface.
References:
Beta Was this translation helpful? Give feedback.
All reactions