lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Apr 22, 2012, at 2:53 PM, Mark Hamburg <mhamburg.lists@gmail.com> wrote:

> 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.
> 
> 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.

For example, if we execute:

t = { 10, 20, nil, 40, [ returnsThree() ] = 30 }

And we then ask what is the value of t[ 3 ]?

The answer is that it can be nil or 30 but no other value.

Mark