wu-lang/wu

[feature] Wildcard in imports

nilq opened this issue · 0 comments

nilq commented

This is something we need to have. While it does have some downsides in introducing bad practice behavior, it's pretty useful.

Given lib.wu with the following content:

bob := "BUILDER"
important_number: float = 100.0

The following otherfile.wu ...

import lib { * }

Should automatically generate the following import code in otherfile.lua:

local lib = require('lib')
local bob = lib['bob']
local important_number = lib['important_number']