Private function revamp #591

Merged
zxq9 merged 4 commits from private-function-revamp into master 2019-06-28 17:55:11 +09:00
zxq9 commented 2019-06-28 17:09:56 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

Now functions exported from a contract must be defined using entrypoint instead of function. Normal functions are always private. This is to make it harder to accidentally export a private function from a contract. Example:

contract Example =
  entrypoint inc(x) = add(x, 1)   // exported
  function add(x, y) = x + y      // private
*Created by: UlfNorell* Now functions exported from a contract must be defined using `entrypoint` instead of `function`. Normal functions are always private. This is to make it harder to accidentally export a private function from a contract. Example: ``` contract Example = entrypoint inc(x) = add(x, 1) // exported function add(x, y) = x + y // private ```
zxq9 commented 2019-06-28 17:51:47 +09:00 (Migrated from gitlab.com)

Created by: happi

Review: Approved

*Created by: happi* **Review:** Approved
zxq9 commented 2019-06-28 17:54:38 +09:00 (Migrated from gitlab.com)

Created by: hanssv

Review: Approved

*Created by: hanssv* **Review:** Approved
zxq9 commented 2019-06-28 17:55:11 +09:00 (Migrated from gitlab.com)

Merged by: UlfNorell at 2019-06-28 08:55:11 UTC

*Merged by: UlfNorell at 2019-06-28 08:55:11 UTC*
Sign in to join this conversation.
No description provided.