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
Maps (dictionaries) are useful for all kinds of reasons.
Objects would be useful for encapsulating all the features of a ValidObservation, e.g. when used in a filter as well as in general coding. Nothing fancy. Just objects, potentially aggregating other objects vs inheritance or interfaces, although I wouldn't rule out interfaces, i.e. ADTs. So, more object-based than OO.
Ability to access member via m.[str] or m.ident.
Add an object construct, starting with maps. Keys in maps can have any value at all, including functions. Some syntactic sugar may help to objectify, e.g.
m <- map { x: 2 f: function(n:int):int ... }
a <- m["x"]
a <- m.x -- same as above
b <- m.f(42)
Implicit or explicit reference to map/object available to map/object function calls (this, self, me, my)?
m <- map { x: 2 f: function(n:int):int { this.x*n } ) -- implicit
b <- m.f(42) -- 84
To achieve this, a function in an object could have a this variable -- m in this case -- added to the current scope.
Could use struct instead of map but latter is more general and powerful and we want to avoid a proliferation of data structures.
Release with a motivating example eg via filters, TG (e.g. maintain heading state).
The text was updated successfully, but these errors were encountered:
Maps (dictionaries) are useful for all kinds of reasons.
Objects would be useful for encapsulating all the features of a
ValidObservation
, e.g. when used in a filter as well as in general coding. Nothing fancy. Just objects, potentially aggregating other objects vs inheritance or interfaces, although I wouldn't rule out interfaces, i.e. ADTs. So, more object-based than OO.Ability to access member via
m.[str]
orm.ident
.Add an object construct, starting with maps. Keys in maps can have any value at all, including functions. Some syntactic sugar may help to
object
ify, e.g.Implicit or explicit reference to map/object available to map/object function calls (
this
,self
,me
,my
)?To achieve this, a function in an object could have a
this
variable --m
in this case -- added to the current scope.Could use struct instead of map but latter is more general and powerful and we want to avoid a proliferation of data structures.
Release with a motivating example eg via filters, TG (e.g. maintain heading state).
The text was updated successfully, but these errors were encountered: