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
class Point { x y }
end
-->
class Point
let x.
let y.
end
Can define slots which use values from earlier slots. (Evaluated in context where there is no self, and slots are represented
by temporary variables -- object is always fully constructed)
class Page
let url.
let content = url fetch.
end
Var declares a mutable slot:
class Counter
var value := 0
method next
value := value + 1!
The text was updated successfully, but these errors were encountered:
Let declares an immutable slot.
Can define slots which use values from earlier slots. (Evaluated in context where there is no self, and slots are represented
by temporary variables -- object is always fully constructed)
Var declares a mutable slot:
The text was updated successfully, but these errors were encountered: