tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
280 stars 56 forks source link

Consider adding missing wrappers for FunC's `store_something()` functions from the `stdlib.fc` #496

Open novusnota opened 5 days ago

novusnota commented 5 days ago
  1. store_maybe_ref() as Builder.storeMaybeRef():

https://github.com/tact-lang/tact/blob/779b0fe736d423d5047222d2443d1ebe7a5dff1e/stdlib/stdlib.fc#L458-L461

As mentioned in Tact chat

  1. store_builder() as Builder.storeBuilder():

https://github.com/tact-lang/tact/blob/779b0fe736d423d5047222d2443d1ebe7a5dff1e/stdlib/stdlib.fc#L638-L639

anton-trunov commented 5 days ago

This is definitely useful for people who wish to go low-level. It would be great to also think of some higher-level constructions which in the end solve the Y problem.

novusnota commented 5 days ago

Well, we have .toCell() and .fromCell() now, which are great win in terms of DX and, potentially, gas optimizations in the future.

And if there's a need for manual parsing/construction of cells with very specific bit sizes, my P.S. comment by the end of https://github.com/tact-lang/tact/issues/472 may be it.

We'll definitely think about it deeper when the Tact 2.0 starts fledging out :)