[- CC: awes...@naquadah.org]
[+CC: awesome-devel@naquadah.org]

On Fri, Feb 17, 2012 at 10:24 PM, Uli Schlachter <psyc...@znc.in> wrote:
> You might be interested in the following commit:
>
> commit 2216b6a341ddb840200ea85207f8a59a5b3d61a6
> Author: Uli Schlachter <psyc...@znc.in>
> Date:   Fri Feb 17 17:48:11 2012 +0100
>
>    gears.color: Add table-based color definitions
>
>    Signed-off-by: Uli Schlachter <psyc...@znc.in>
>
> The syntax is almost identical to what you proposed above. The only difference
> is that I went with "type" instead of "gradient".
[...]
> -- @return a cairo pattern object
> function create_png_pattern(file)
> +    local file = file

Why do we write `local file = file`?  Aren't function arguments
lexically scoped?

[...]
+    elseif type(col) == "table" then
+        local t = col.type

`type` is a core Lua function.  I wonder if it is a good practice to
use it is a variable name in our code.  Might it be a better idea to
redefine the standard `type` as `__type` instead?

-- 
Anurag Priyam

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to