[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Autolocals?
- From: "Alexander Gladysh" <agladysh@...>
- Date: Sat, 22 Mar 2008 11:48:43 +0300
> > However there is one weak spot -- the import function. It is too easy
> > to mess things up and write arguments in wrong order:
> >
> > local foo, bar, baz = import 'path/to/file.lua' { 'bar', 'baz', 'foo' }
>
> local Corge = require 'qux.quux.Corge'
> local foo = Corge.foo
> local bar = Corge.bar
> local baz = Corge.baz
Wel, two things.
1. I prefer to avoid using require.
2. There is no validation for Corge.foo to actually exist.
Alexander.