[go: up one dir, main page]

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

Constant with Unit #2000

Open
xushiwei opened this issue Oct 30, 2024 · 0 comments
Open

Constant with Unit #2000

xushiwei opened this issue Oct 30, 2024 · 0 comments

Comments

@xushiwei
Copy link
Member
xushiwei commented Oct 30, 2024

Proposal

const unit Distance (
    mm = 1
    cm = 10
    dm = 100
    m  = 1000
)
step 1m  // move forward 1 meter

const unit time.Duration (
    s = time.Second
    m = time.Minute
    h = time.Hour
)
wait 1s  // wait 1 second
wait 1m  // wait 1 minute. Note that it does not conflict with `step 1m`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant