[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ? assignments are not expressions ?
- From: Will Leshner <will@...>
- Date: Tue, 27 Mar 2001 09:36:55 -0700
Actually, as I was typing the various responses I think I came to
essentially the same conclusion: leave Lua alone. I think you are right that
what I was proposing was basically a different kind of language. I have
thought that a Scheme without the parens might be kind of interesting. But
Lua is something different and probably better for it.
> From: "Magnus Lie Hetland" <mlh@idi.ntnu.no>
> Reply-To: lua-l@tecgraf.puc-rio.br
> Date: Tue, 27 Mar 2001 19:30:21 +0200
> To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
> Subject: Re: ? assignments are not expressions ?
>
> From: "Will Leshner" <will@softbook.com>
>>
>
>> Then assignment should be an expression. And why can't I do something like
>>
>> x = while y < 10 do y = y + 1 end
>
> No you're definitely moving into sceme country... :)
>
> What is the above supposed to mean? Or, rather, what
> would you like x to be? 10? What is the return value
> of a loop -- the return value of the last
> expression/statement in the loop? Or should we perhaps
> use a "return" statement in loops as well? Or make
> "return" statements obsolete in functions?
>
> This might be a good ideas in some languages, but in
> a (predominantly) imperative language, it seems...
> well... strange to me.
>
>> I imagine that might really by a maintenance nightmare,
>> but it wouldn't have to be used by somebody worried
>> about such things.
>
> The problem is that you usually maintain other people's
> code.
>
> What you are proposing is in essence a completely
> new/different language; scheme with "imperative
> syntax" so to speak. If you make it I will most
> certainly play with it, but warping Lua to such a
> degree seems excessive (and improbable).
>
> --
>
> Magnus Lie Hetland http://www.hetland.org
>
> "Reality is that which, when you stop believing in
> it, doesn't go away." -- Philip K. Dick
>
>
>