lua-users home
lua-l archive

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


My mail client happened to collapse every message in this thread
except the first and last. The juxtaposition is a little weird, and
with all this talk of "natural" languages, I'm not sure I even know
what you're all actually arguing about. One of you thinks lightly
mathematical language is natural, the other's definition of natural is
closer to colloquial. Unless you want to settle on a common standard,
you're both going to just keep talking past each other.


On Mon, Sep 9, 2013 at 4:16 PM, Michael Richter <ttmrichter@gmail.com> wrote:
>
> On 10 September 2013 04:42, Seppl Vorderhörer <Seppl.Vorderhoerer@t-online.de> wrote:
>>
>> "for" is used in Lua in two forms:
>>     for var=start,end,inc do something
>>
>> ... which is pretty close to a native language: run through all values from start to end.
>
>
> Build me a sentence in English—one that sounds natural and not stilted—that uses "for" and means what that line of code means.
>>
>> Same applies to
>>     for a,b in pairs(c) do something
>
>
> Ditto for this.

Again, you need to decide on a definition of "natural and not stilted"
before you pose that challenge. If we're talking to random people off
the street, Michael is right. If we're talking to people who've
completed even basic college-level math courses, there's nothing odd
or stilted about "for every element in the set defined by this
expression do the following" or "for every element in this explicitly
stored set".


> I ate cake and ice cream.  In 99.44% of natural language uses "and" and "or" (see what I did there?) are not related to truth values at all.  These variants come, again, from the maths, not from natural language.

Now you're just being unfair. Logical operators are most frequently
used in conditional statements. The "natural" language (by any
definition) equivalent is either going to be interrogative or
conditional: "Did you eat cake and ice cream?" "Do you like beer or
wine?" "If you like almonds and aren't opposed to eating honey, then I
can get you a desert I'm sure you'll love."