Please note that this is a genuine question. I'm not rep-whoring. But if anyone feels like closing it like this one please don't close before I get an answer.
That said, I'd seriously like to know why Lua
doesn't have augmented assignment like most other languages.
> f = 100
> f *= 5
stdin:1: syntax error near '*'
I understand that language design involves a lot of decisions but when It comes to a question like should we include augment assignment?, the answer to me seems like a no-brainer. If I were to design a language(big if), the first thing to do would be to include all the conventional set of statements and then worry about the rest of the concepts.
I still can't figure out why the folks at Tecgraf decided to not include augmented assignments in Lua
. If I were to give an answer to this question I would give some way-of-the-mark reason like augmented assigment would make parsing harder considering Lua's free form syntax. It's a crazy answer, I know, I need someone else's more reasonable opinion or at least a reference that justifies this design decision.