[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Packaging and importing
- From: "Vijay Aswadhati" <wyseman@...>
- Date: Tue, 16 Aug 2005 09:43:50 -0700
> import "a.b.c"
> ==>
> local c = require "a.b.c"
>
> import("a.b.c", d, e, f)
> ==>
> local c = require "a.b.c"
> local d, e, f = c.d, c.e, c.f
>
> Realistic examples:
>
> import("math", sin, cos, tan)
> import("string", sub, gsub, find, gfind)
>
Very very nice syntax; This is a 'fits like a glove' proposal methinks. I
vaguely remember see this as a feature of Python. Since I mentioned Python,
would allowing a regular expression to find the names to import as in:
<code>
import("blob", "foo_*")
import("blob", "bar_*")
</code>
make the proposal better or worse?
Can LHF's upcoming preprocessor be used to implement this feature?
Vijay Aswadhati