Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Tact 1.3.0 #33

Open
15 tasks done
anton-trunov opened this issue May 3, 2024 · 0 comments
Open
15 tasks done

Support Tact 1.3.0 #33

anton-trunov opened this issue May 3, 2024 · 0 comments

Comments

@anton-trunov
Copy link

anton-trunov commented May 3, 2024

The Tact team has just release Tact v1.3.0 on NPM.

The full CHANGELOG for Tact v1.3.0 can be found here: https://github.com/tact-lang/tact/blob/main/CHANGELOG.md#130---2024-05-03

And here are a summary of editor/IDE-relevant Tact features.

New or fixed syntax

  • Fixed precedence levels for bitwise operators, equality and comparisons. Now the precedence levels match common languages like JS/TS.
  • Support for string escape sequences: \\, \", \n, \r, \t, \v, \b, \f, \u{0} through \u{FFFFFF}, \u0000 through \uFFFF, \x00 through \xFF.
  • Allow chaining method calls with !!, for instance, map.asCell()!!.hash() is grammatically correct now.
  • Trailing commas are allowed in struct instantiations, initOf arguments, init() parameters, inherited traits via with, function arguments and parameters.
  • Struct fields punning, i.e. {foo, bar} is syntactic sugar for { foo: foo, bar: bar }.
  • Inherited trait lists now must be non-empty if with is used.
  • Bitwise XOR (^) operator.
  • The implicit empty init function is now present by default in the contract if not declared.
  • try {...} and try {...} catch {...} statements.
  • foreach loop for the Map type: foreach (k, v in map) {...}.

New stdlib functions

  • pow2, log2 and log math functions in @stdlib/math.
  • Reserve mode constants in @stdlib/reserve, namely ReserveExact, ReserveAllExcept, ReserveAtMost, ReserveAddOriginalBalance, ReserveInvertSign, ReserveBounceIfActionFail.

New methods

  • The concat non-modifying StringBuilder's extension function for chained string concatenations: foo.concat(bar).concat(baz).
  • The toString extension function for Address type: addr.toString.
  • The isEmpty and del extension functions for the Map type: map.isEmpty, map.del(key).

Related issue #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant