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
I would like to request indexed property as new feature in gravity language. Indexed property basically works just like list/array property with getter and setter. This feature is found in Object Pascal language.
class foo {
var items[] { // index
set {
// with "value" and "index" would be identified as default parameter name
....
}
get {...}
};
var names[name] { // name as index (string)
set {
// with "value" as default parameter name
....
}
get {...}
};
var point[x,y] {
set (newb) { // parameter name can be specified
.....
}
};
}
I believe it would be great to have such as this feature in gravity.
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
-
Hello,
I would like to request indexed property as new feature in gravity language. Indexed property basically works just like list/array property with getter and setter. This feature is found in Object Pascal language.
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Properties_(Delphi)#Array_Properties
Propose we can have syntax like this in gravity:
I believe it would be great to have such as this feature in gravity.
Regards,
-Jaimy.
Beta Was this translation helpful? Give feedback.
All reactions