by tsujp on 1/29/23, 1:18 PM with 50 comments
by latch on 1/29/23, 3:24 PM
(Not affiliated with either, just can be easy to miss stories on here sometimes, and I figured anyone interesting in Bog might also be interested in Cyber)
by Taywee on 1/29/23, 2:58 PM
I'm not sure how I would embed this in a non-Zig project, though.
by JonChesterfield on 1/29/23, 1:44 PM
> let {print} = import "std.io"
An idea obvious in hindsight that I hadn't thought before - if import returns an environment and let can destructure, then a pattern match can bind an explicit subset of that import. Something like:
`(let {print read} (import io) (print (read)))`
Further down I find essentially that example (with input instead of read) and destructuring assignment within function arguments:
`let add = fn ((a,b)) a + b`
though the grammar suggests that {} is initialisation and not a map/dict/hash/assoc/environment style thing, so you probably don't have `fn ({key value}) value + 4` or similar for taking maps apart as they are passed to a function. Thus I think import is special cased.
The bytecode layer knows what maps are though, so maybe they're just missing from the syntax
by girvo on 1/29/23, 11:05 PM
Aside from my biased nitpick, it looks pretty neat!
by dom96 on 1/29/23, 4:14 PM
by IshKebab on 1/29/23, 3:50 PM
I don't think you need to call out strong typing. Who would make a weakly typed language in 2023?
by timeon on 1/29/23, 2:19 PM
by samsquire on 1/29/23, 2:19 PM
How are coroutines scheduled?
Can suspend return a value?
by detrites on 1/29/23, 4:50 PM
by odedbend on 1/29/23, 2:00 PM
by Titan2189 on 1/30/23, 3:44 AM
by sitkack on 1/29/23, 3:57 PM
Looks like a LuPyrby language.
by boxed on 1/29/23, 8:44 PM
by moomin on 1/29/23, 4:44 PM