-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Komodo has a dedicated syntax construct to import stuff:
from "place" import thing
from "place" import (thing1, thing2)
This is fine and can be used nicely, but I'm starting to think it would be better to use import like a function:
let {"thing" => thing,..} := import("place")
This will make dependency injection straightforward and remove the need from some keywords (import, from, as) to exist.
The only thing that I don't like is that there wouldn't be a special syntax for stdlib imports anymore.
Also, to make this new way of importing things more ergonomic, I would like to add the following:
-
a more explicit syntax difference between sets and dicts. For example:
let %{ "thing" => thing,.. } := import("place")To just import
thingfromplace. -
Use
<name>as a shorthand for"<name>" => namein dicts. The example above would be like this:let %{ thing,.. } := import("place")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels