[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ah, those uninitiated people...
- From: David Kastrup <dak@...>
- Date: Wed, 13 Jan 2010 20:05:12 +0100
Tony Finch <dot@dotat.at> writes:
> On Wed, 13 Jan 2010, David Kastrup wrote:
>> Tony Finch <dot@dotat.at> writes:
>> >
>> > What I meant was how to represent the coupling between the instruction
>> > pointer and the program state in the source code. You can represent
>> > each state as a function so that state transitions are tailcalls.
>>
>> But that often causes contortions as well. You gain a lot more
>> expressive power if "state transitions are calls" merely. Sometimes it
>> is not easy to arrange for a call to get tail.
>
> If you implement a state transition as a non-tail-call then you'll get
> unbounded stack growth.
Not if you can get back to the same state only via a state transition
implemented as a return.
--
David Kastrup
- References:
- Ah, those uninitiated people..., Alexander Gladysh
- Re: Ah, those uninitiated people..., Enrico Colombini
- Re: Ah, those uninitiated people..., Roberto Ierusalimschy
- Re: Ah, those uninitiated people..., Andrew Wilson
- Re: Ah, those uninitiated people..., Mark Hamburg
- Re: Ah, those uninitiated people..., steve donovan
- Re: Ah, those uninitiated people..., David Given
- Re: Ah, those uninitiated people..., Tony Finch
- Re: Ah, those uninitiated people..., Wesley Smith
- Re: Ah, those uninitiated people..., David Kastrup
- Re: Ah, those uninitiated people..., Tony Finch
- Re: Ah, those uninitiated people..., David Kastrup
- Re: Ah, those uninitiated people..., Tony Finch