Skip to content

Proposal: type aliases in Clarity #1171

@lgalabru

Description

@lgalabru

In the context of the BNS contract, I'm dealing with the following type:

(price-function (tuple 
    (buckets (list 16 uint)) 
    (base uint) 
    (coeff uint) 
    (nonalpha-discount uint) 
    (no-vowel-discount uint)))

It could be nice, from a developer point of view, to have the ability to define type aliases, aiming at improving readability:

(define-type price-function-type (tuple (buckets (list 16 uint))
                                         (base uint)
                                         (coeff uint)
                                         (nonalpha-discount uint)
                                         (no-vowel-discount uint)))

It could be an edge case not worthing the effort - opening an issue for tracking this idea.

Metadata

Metadata

Assignees

Labels

clarityiceboxIssues that are not being worked on

Type

No type

Projects

Status

Status: 🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions