Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.object Subject: Re: Continuations Message-ID: <4406@helios.ee.lbl.gov> Date: 8 Dec 89 00:38:15 GMT References: <2664@bingvaxu.cc.binghamton.edu> <9624@pyr.gatech.EDU> <1623@odin.SGI.COM> <1989Nov28.183816.15252@odi.com> <9964@june.cs.washington.edu> <1989Nov29.225826.19483@odi.com> <10008@june.cs.washington.edu> <5153@tekcrl.LABS.TEK.COM> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 42 X-Local-Date: 7 Dec 89 16:38:15 PST In article <5153@tekcrl.LABS.TEK.COM> kend@mrloog.WR.TEK.COM (Ken Dickey) writes: >In article <10008@june.cs.washington.edu> peterd@june.cs.washington.edu (Peter C. Damron) writes: >>Let's get this straight. >>... >>2. C and C++ do not allow nested functions, but they do support block >> structure. Thus the lexical scoping is not "trivial". > >In C you get a local/global namespace. You don't have name scoping in >blocks nested more than 1 deep. That's pretty trivial. Not true. In C you have a global namespace, a struct namespace, and multiple nested local namespaces. For example: int x; /* in global namespace. */ struct foo { int x; /* struct namespace. */ }; routine() { int x; /* first local namespace. */ { int x; /* first of many possible nested local namespaces. */ /* you can nest as deep as you like. */ ... } } At every new scope, the x's in the outer scopes are hidden. Why does this constitute "trivial" name scoping? Sorry if this response was long winded. Let's quit quibbling over legitimate language differences. Some languages are good for one thing, some another, none are suitable for every programming task. ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------