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

Alias int-to-<ascii-or-utf8> to uint-to-<ascii-or-utf8> #61

Open
hugocaillard opened this issue Jun 13, 2023 · 3 comments
Open

Alias int-to-<ascii-or-utf8> to uint-to-<ascii-or-utf8> #61

hugocaillard opened this issue Jun 13, 2023 · 3 comments
Labels
need-refinement The issue is not specific enough and need to be reworked

Comments

@hugocaillard
Copy link
Collaborator

The native functions int-to-ascii and int-to-utf8 take one argument that can be an int or uint. Which is rare in Clarity, that is usually picky with types.
Because of that, this function can look off at first glance:

(define-private (func (a uint))
  (int-to-ascii a)
)

A clarity developer might try to type uint-to.. but the auto-completion wouldn't be triggered, hence the suggestion add 2 aliases:

  • uint-to-utf8
  • uint-to-ascii
@LNow
Copy link

LNow commented Jun 14, 2023

@hugocaillard
Copy link
Collaborator Author

Ah! Thanks for referencing it @LNow.
Looks like the conversation did not come to a conclusion at that time 🤔

@LNow
Copy link

LNow commented Jun 14, 2023

The conclusion for me was simple - no clarity in Clarity 😬

@hugocaillard hugocaillard added the need-refinement The issue is not specific enough and need to be reworked label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-refinement The issue is not specific enough and need to be reworked
Projects
None yet
Development

No branches or pull requests

2 participants