0.13.5
-
motoko (
moc)-
Breaking change (minor) (#4786):
-
Add new keyword
transientwith exactly the same meaning as the old keywordflexible(but a more familiar reading). -
Add keyword
persistent.When used to modify the
actorkeyword in an actor or actor class definition, the keyword declares that the default stability of a
letorvardeclaration isstable(notflexibleortransient).For example, a stateful counter can now be declared as:
persistent actor { // counts increments since last upgrade transient var invocations = 0; // counts increments since first installation var value = 0; // implicitly `stable` public func inc() : async () { value += 1; invocations += 1; } }
On upgrade, the transient variable
invocationswill be reset to0andvalue, now implicitlystable, will retain its current value.Legacy actors and classes declared without the
persistentkeyword have the same semantics as before.
-
-
Added new primitive
replyDeadline : () -> Nat64to obtain when a response for a best-effort message is due (#4795). -
bugfix: fail-fast by limiting subtyping depth to avoid reliance on unpredictable stack overflow (#3057, #4798).
-
-
motoko-base
-
Added
Text.fromListandText.toListfunctions (caffeinelabs/motoko-base#676). -
Added
Text.fromArray/fromVarArrayfunctions (caffeinelabs/motoko-base#674). -
Added
replyDeadlinetoExperimentalInternetComputer(dfinity/motoko-base#677).
-