tact-lang / tact-docs

Tact main documentation
https://docs.tact-lang.org
54 stars 41 forks source link

Check if there are more undocumented builtin functions #163

Closed anton-trunov closed 3 months ago

anton-trunov commented 6 months ago

see for example #162

novusnota commented 6 months ago

Depends on #75.

UPD: Not anymore!

novusnota commented 5 months ago

Hopefully will be closed by #206, as it covers #75. But it doesn't hurt to double-check :)

Going forward, only the formatting/spellchecking issues may cause the same amount of changes, but I'll make sure to make them as focused as possible and targeting only one issue at a time even if that would mean multiple waves of auto-generated changes across the docs. "One issue = one PR" should become a rule and not a suggestion as of today.

novusnota commented 4 months ago

Ok, I think that's it — seems like all the built-in functions out there are covered in the docs. Could you please double-check https://docs.tact-lang.org, @anton-trunov @Gusarich @byakuren-hijiri

Gusarich commented 4 months ago

@novusnota why is sha256 described in Core library - Math instead of Global static functions?

Same question can probably be applied to require, dump, dumpStack and emptyMap but I'm not sure if we even need to list them there in a separate way

novusnota commented 4 months ago

@Gusarich

I think it's better to put functions to where they belong semantically rather than trying to be faithful about their actual origin — users of Tact don't really have to know whether function originates from Tact code, TypeScript code or even some dynamic library written in languages with manual memory management and then wrapped nicely to work with Tact code. Not that we have those yet, but we could do so if we'd need to get through some performance bottleneck for example.

Users of Tact just need to know that the function exists, is accessible from Tact and works in certain ways, throws certain exceptions and that it may or may not be able to resolve some of its values at compilation time. Other details such as where does the function come from is more interesting to the potential contributors to the Tact compiler.

On that note, it may be worthwhile to mention TypeScript origins of some functions in these docs, although I'd leave those details for some sort of CONTRIBUTING.md or ARCHITECTURE.md files in the Tact compiler repo. Those or similar have to be made at some point anyways :)