[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [BUG] Table constructor not equivalent to left-to-right assignment (Was: Testing for a sequence ...)
- From: Robert Virding <robert.virding@...>
- Date: Mon, 23 Apr 2012 03:09:07 +0100 (BST)
----- Original Message -----
> On Apr 22, 2012, at 11:22 AM, Robert Virding
> <robert.virding@erlang-solutions.com> wrote:
>
> > Without a clear deterministic definition of the language it can be
> > basically impossible to determine what your program does. It also
> > becomes impossible to reason about.
>
> Go read Dijkstra or Gries. Their control flow constructs were
> non-deterministic.
Yes, sort of. The communication between processes in CSP is non-deterministic, but not the sequential part within a process which is what we are discussing here.
> Basically, in this case, you have to stop thinking of the program as
> being in a specific state but rather in one of a set of states and
> you reason in terms of properties of that set.
Of course, it is very nice to know what the next state will be. In some places in Lua this is not so.
As a final point the example expansion of a table construction in the manual doesn't hold:
t={'aa','bb','cc',[1]='mm'} print(t[1]) ---> aa
As I have said there is no use in continuing this discussion as we are clearly divided on some of the fundamentals.
Robert