lua-users home
lua-l archive

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


On Mon, Apr 27, 2015 at 2:04 PM, Marc Balmer <marc@msys.ch> wrote:
>
>
> Am 27.04.15 um 14:18 schrieb Egor Skriptunoff:
>> Hi!
>>
>> I have defined 150 local variables and created an array,
>> in which 50-th element is a nested array of length 50.
>> ---------------------------------------------------------
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> a = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
>>       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
>>      {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
>>       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2}}
>> ---------------------------------------------------------
>> Both Lua 5.2 and Lua 5.3 have failed to compile it:
>> test.lua:10: function or expression too complex near '2'
>>
>> Why such short code is considered to be "too complex"?
>> I'd like to write much more complex programs than this one.
>
> This program is not complex.  It is - kind of - idiotic.
>
> If you were a prgrammer in my company, you would be fired by now.
>
> I hope you will write more meaningful programs than this one.
>
>

Of course this program is just a simplified test case demonstrating
the issue that was encountered by complex machine-generated code...

Granted, even generated code should be well structured, or else you
run into issues like this.

-- 
Sent from my Game Boy.