Posted by phreddypharkus 20 hours ago
Instead of obj?.:method?.(…) it would be like obj#:method#(…)
Replace # with your favorite extra character instead of questionmark.
So you'd have: obj?:method(…)
Lua could have ?. ?[ ?" ?{ and ?(
1) Ease of learning, ideally minimal deviant behaviour (eg i consider lua tables to be a new concept in itself)
2) Reasonably fast. Not as much as lua jit but even half would be good enough
3) Mature
4) Has Rust bindings
That's just one example of so many more. I get that lua occupies a useful niche with its focus on embedded systems, but lua is not really a well-designed language in general. JavaScript has a similar problem.
if x + y + z > a
or verylongconditionalhere ()
or anotherverylongconditionalhere ()
then
...
after `if` and `elseif` the parser simply goes on until it finds `then`. for long,list,of,variables,here
in ageneratorhere(bigparameterhere)
do
end
and local x do
-- everything after is just here to define x
end
I'm still a little irked it works so well, the only alternative would be for the language to have labeled blocks. but that might be too terseIn Ruby you can choose between "then" and a newline.
This is very pot calling the kettle black.