Bog – small, strongly typed, embeddable language
Thank you for posting this.<p>> let {print} = import "std.io"<p>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:<p>`(let {print read} (import io) (print (read)))`<p>Further down I find essentially that example (with input instead of read) and destructuring assignment within function arguments:<p>`let add = fn ((a,b)) a + b`<p>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.<p>The bytecode layer knows what maps are though, so maybe they're just missing from the syntax