[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why do we have ipairs?
- From: Coda Highland <chighland@...>
- Date: Fri, 27 Jun 2014 08:13:01 -0700
On Fri, Jun 27, 2014 at 7:43 AM, Jay Carlson <nop@nop.com> wrote:
>
> On Jun 26, 2014 9:19 PM, "Coda Highland" <chighland@gmail.com> wrote:
>>
>> On Thu, Jun 26, 2014 at 4:04 PM, Sean Conner <sean@conman.org> wrote:
>> >> It's soooo much easier to analyze and comprehend the flow of control in
>> >> a
>> >> simple series of adjoining statements than it is across a series of
>> >> function
>> >> calls, especially recursive calls.
>> >
>> > I'll grant you it can feel wierd at first, seeing a bunch of functions
>> > all
>> > call each other and not blow out the stack, but with exposure, you get
>> > used
>> > to it. Heck, people got used to Perl, for crying out loud.
>>
>> <smug lisp weenie>I was recursing before it was cool.</smug lisp weenie>
>
> If you approach it as a 6502 assembly language programmer, it makes sense
> too. Instead of writing
>
> JSR PRINT
> RTS
>
> you peephole-optimize that to
>
> JMP PRINT
>
> Unix shell programmers will write
>
> exec lua -lsocket ./foo.lua "$@"
>
> in wrappers. If you read and write code like this long enough, your brain
> chunks "return f()" as "goto".
>
> I argue that Lua is more clear than Scheme in this regard; in Scheme you
> have to know where the tail position is by the shape of the special form.
> "return <function-call-expr>" is explicit.
>
> Jay
Yeah, I know, I know, and I agree. I just wanted to tag some hipster
cred in there. *laugh* I really can be a smug LISP weenie sometimes.
/s/ Adam
- References:
- Re: Why do we have ipairs?, Thiago L.
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, Jay Carlson
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, Andrew Starks
- Re: Why do we have ipairs?, Axel Kittenberger
- Re: Why do we have ipairs?, Paige DePol
- Re: Why do we have ipairs?, William Ahern
- Re: Why do we have ipairs?, Sean Conner
- Re: Why do we have ipairs?, William Ahern
- Re: Why do we have ipairs?, Sean Conner
- Re: Why do we have ipairs?, Coda Highland
- Re: Why do we have ipairs?, Jay Carlson