|
|
||
|
So, I would prefer to be able to write something like (VHDL flavor, and
yet another even more disturbing keyword :-) knowing that if elseif...
could be reused)
style = "native"
a = { a = 1,
b = { b = 2,
c = 1 when style == "native",
2 when style == "rock",
0 else
}
}
rather than
[...]
style = "native" a = { a = 1, b = { b = 2, c = f(style) } } function f(style) ... end
which disseminates the code, and well looks like coding.
I made a typo while writing this code, typing if style = "native" then
-- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --