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
For structs, using letter case as modifier will be better for clean code. Also we don't have to look on the struct implementation whether its public or private or static whatever.
Here is my proposed syntax,
structDuck{Id:i8;// Capital on first letter makes a static property
_Name:str;// Underscore denotes a private and capital 'N' for static. So it's a private static property.
color:str;// public property
priv age:i8;// private property}
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
-
For structs, using letter case as modifier will be better for clean code. Also we don't have to look on the struct implementation whether its
public
orprivate
orstatic
whatever.Here is my proposed syntax,
Old syntax,
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions