[Shootout-list] Directions of various benchmarks
Bengt Kleberg
bengt.kleberg@ericsson.com
Mon, 23 May 2005 10:49:38 +0200
On 2005-05-21 08:37, Isaac Gouy wrote:
> --- John Skaller <skaller@users.sourceforge.net> wrote:
....deleted
sorry for the big quoute here:
>>You aren't being entirely clear: is it is OK to have a specification
>>that says 'what needs to be done' but still do it a different way?
>>[If so I have no problem with it: 'calculate the same result
>>as this algorithm would' is fine by me]
>>
>>If not:
>>
>>In Ocaml you tell me to make an array and 'do
>>so an so' to the array .. but I use a list instead.
>>Is that OK?
>>
>>What do you do in Lua, which doesn't HAVE any arrays?
>>
>>If the spec says a list .. what do you do in Python,
>>which doesn't HAVE any lists?? [Python 'list' construct
>>is not a list, its an array]
>>
>>Sure, I can write a Lua program that 'looks' like it
>>is using an array, and a Python program 'looks' like
>>it is using a list .. but they aren't *actually* doing
>>so .. whatever that means ..
>
>
> It seems your information is out-of-date:
>
> "Unlike other scripting languages, Lua does not offer an array type.
> Instead, Lua programmers use regular tables with integer indices to
> implement arrays. Lua 5.0 uses a new algorithm that detects whether
> tables are being used as arrays and automatically stores the table as
> an actual array, instead of as a hash table."
since the quote ''Lua does not offer an array type'' agrees with the
statement ''Lua, which doesn't HAVE any arrays'' i find it difficult to
understand why the information is out-of-date. could you please explain?
moreover, even if the information is out-of-date there still remains the
othjer 2 items are still there and need to be addressed.
do you say that one out-of-date statement in a multitude of statements
make the others irrelevant?
bengt