On Sun, 12 Oct 2003 03:16:36 +0200, in comp.lang.c , Sidney Cadot
<> wrote:
>Hi Mark,
>
>>>I think the issue here is to distinguish between something that
>>>/logically/ behaves like a stack,
>
>> In what way does the standard /REQUIRE/ the logical behaviour of a
>> stack.
>
>Well, in a very obvious way really. Actual parameters and local
>variables are accessible during execution of a function; they become
>inaccessible during a recursive call as the same formal parameters and
>local variables now refer to new, independent variables, which cease to
>exist upon return from the secondary call to the same function. I think
>you will agree that this behavior is prescribed by the standard.
it is, but its not necessary for a stack to be used either literally
or logically to achieve this. I have a ladder to access the top shelf
of my books. When I'm pulling down Sci Fi books, I can't access my C
books, and vice versa. But I still don't have a stack of books with
LIFO type behaviour.
>To me at least, this seems equivalent to viewing the set of parameters
>and local variables as a tuple;
sure, you can regard it that way, its your mindset. I'm just trying to
make clear that the standard doesn't require you to think of it like
that, or implementors to implement it thus
>My main argument in this thread is not whether C prescribes a logical
>stack or not;
IMHO it does not.
>for me that's a useful model
Thats ok with me. I don't feel the need to have it.
>On the risk of committing speculation, I think you would be hard-pressed
>to find a compiler implementor who doesn't use the stack as a very
>useful model while implementing a C (or any other) compiler.
I suspect this discussion is now well into the realm of
comp.compilers. Perhaps you should continue it over there?
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---