[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Assignment in C++ like DSL
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 25 Dec 2015 09:54:08 +0200
On Thu, Dec 24, 2015 at 10:04 PM, Duncan Cross <duncan.cross@gmail.com> wrote:
> languages. My understanding is that keeping this strict division
> between expression and statement is part of the simplicity that Lua
> needs to keep its parser as fast as possible.
I suspect that relaxing this rule would not make the parser much
slower; the simplicity of Lua is intended to help the _human_ parsing
the code. E.g. the famous C/C++ mistake 'if (a = b)' is not possible.
Code is easier to read when there aren't too many possible surprises.