gluon-lang / gluon

A static, type inferred and embeddable language written in Rust.

Home Page:https://gluon-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Design suggestions

Nuxssss opened this issue · comments

let io @ { ? } = import! std.io
let random = import! std.random
let int = import! std.int
let string = import! std.string
let { Result } = import! std.result

do _ = io.println "Guess a number between 1 and 100!"
do target_number = random.thread_rng.gen_int_range 1 101

why not

import! io @ { ? } = std.io
import! random = std.random
import! int = std.int
import! string = std.string
import! { Result } = std.result

do! io.println "Guess a number between 1 and 100!"
let! target_number = random.thread_rng.gen_int_range 1 101

I think it will be like F# computation expressions
What do you think about it?