Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: I'm wrong or Will we fix the ducks limp? Date: Tue, 7 Jun 2016 16:55:51 +1000 Lines: 29 Message-ID: References: <87mvn22veg.fsf@rudin.co.uk> <13108bea-6750-443b-bee8-0532aba8b338@googlegroups.com> <5753c89b$0$1616$c3e8da3$5496439d@news.astraweb.com> <1465148542.2670061.628500777.62F1EFE1@webmail.messagingengine.com> <5754f36b$0$1619$c3e8da3$5496439d@news.astraweb.com> <5755a2a5$0$1611$c3e8da3$5496439d@news.astraweb.com> <1465232248.1109132.629464689.31293D92@webmail.messagingengine.com> <5755c809$0$1622$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de CLxiNYr/zWDZxDbzP9keKwInPMGfF4ZFBIRxQD4KbgcQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'compiler': 0.05; 'cc:addr :python-list': 0.09; 'runtime': 0.09; 'satisfy': 0.09; 'though...': 0.09; 'variables': 0.15; '(assuming': 0.16; '2016': 0.16; 'allocates': 0.16; 'c89': 0.16; 'char,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'gregory': 0.16; 'lookups': 0.16; 'proportion': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'structs': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'variable': 0.18; 'language': 0.19; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'fairly': 0.22; 'arrays': 0.22; 'int,': 0.22; 'strict': 0.22; 'header:In-Reply- To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'cpu': 0.29; 'hash': 0.29; "i'm": 0.30; 'that.': 0.30; 'code': 0.30; 'putting': 0.30; 'standards': 0.30; 'guess': 0.31; 'table': 0.32; 'run': 0.33; 'addresses,': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'tue,': 0.34; 'except': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'received:74.125.82': 0.35; 'but': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'there,': 0.37; 'say': 0.37; 'things': 0.38; 'sure': 0.39; 'subject:the': 0.39; 'your': 0.60; 'avoid': 0.61; 'real': 0.62; 'making': 0.62; 'compliant': 0.66; 'surprise': 0.72; 'million': 0.74; 'chrisa': 0.84; 'fifty': 0.84; 'float,': 0.84; 'standards.': 0.84; 'to:none': 0.91; 'careful': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=7h2wS5e/lcWU0IMNg35XU/Pqx7CTt6C+YJnkmmR6lSQ=; b=Ct3GMUtBBa7RRTdnluCZxUaATBXzPlE5iNGOk1gnCCiSLe84ILM8DftyaaUT/dyV4g yoq7gTIe7mjTDnX/Zp31JZGM3nIexY98rwH7dYFHomX4RpDZK2RdoN8NLqRmSZ0Kg1C7 ttwVo1Wx1/Yt3X3C/HMvdjimsU/oU5tmlf4j4LMppEYjEkGwRZ0ShlWk2PU9sVLLYgRo JCYKrM5BUbqGFbhHn3luEAcMuB06zaK9SWjaPfv4pZuTaolyGqo4ufZVtWgi59tU9Yd2 q41y488d02jSld+sVrbsYYYd/d2VPXrrW8uXU2yDod1+gkwWD/QNkPw9ACvMiQm01zi+ GqrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=7h2wS5e/lcWU0IMNg35XU/Pqx7CTt6C+YJnkmmR6lSQ=; b=AqnLmL1pYeBgHuETABEqe+XQ/Yl99FiexELbi1bDCU6jvkNt66P2fA+hSSKjLJ2WaX rwUppR36DYwByRS+A5cof8d2PyC3K51CahOr6Ylrant2B+xggjqVIKuP/SDn5c8Q9tXc 8wmJErF/Gwc7JtlpYpTgUlYpZtRCzoFhOmNloeyP0++ZCAsGXr5lQJX/wOM+XEgmly73 X8vIU58FndGosOYvPUXgKMcGYPWR1usPUYoiLBIJj/mfD0P8H/nmsingBgDi25ulYxFn kolONklrWZFe+xxe7UK11smDaT4a8l2Qi0mFd+iQSnmzSRL97kMNuQj/n7q1aA3acl6L xzig== X-Gm-Message-State: ALyK8tK1g8sOtemPsBBMBxjROJXtS+wWsVBgUbeOnY3n7jzcG9GwxhL4UnoKU2sg7ZQp1pUJtAczoYBsA3c6vw== X-Received: by 10.28.10.65 with SMTP id 62mr895488wmk.81.1465282552372; Mon, 06 Jun 2016 23:55:52 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <87mvn22veg.fsf@rudin.co.uk> <13108bea-6750-443b-bee8-0532aba8b338@googlegroups.com> <5753c89b$0$1616$c3e8da3$5496439d@news.astraweb.com> <1465148542.2670061.628500777.62F1EFE1@webmail.messagingengine.com> <5754f36b$0$1619$c3e8da3$5496439d@news.astraweb.com> <5755a2a5$0$1611$c3e8da3$5496439d@news.astraweb.com> <1465232248.1109132.629464689.31293D92@webmail.messagingengine.com> <5755c809$0$1622$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:109607 On Tue, Jun 7, 2016 at 4:33 PM, Gregory Ewing wrote: > Steven D'Aprano wrote: >> >> I think I'm on >> fairly solid ground to say that a language that is just like C except that >> it allocates variables in a hash table at runtime, using runtime lookups >> for variable access, would not satisfy the C89 or C99 standards. > > > I wouldn't be so sure about that. Modern C standards are > pretty careful to avoid making any promises about how > things are laid out in memory, etc. > > It wouldn't surprise me much if you could come up with > such an implementation that adheres to the strict letter > of the standard. It also wouldn't surprise me if that > implementation failed to run a large proportion of > real C code out there, though... Without having read any of the specs, my guess is you could be C89/C99 compliant putting all your "simple variables" into the hash table - int, char, float, double, etc - but keep all your arrays and structs in "real memory". There's no reason a CPU couldn't be built with fifty million registers available, and the compiler could just put all those scalars into registers (assuming you never take their addresses, in which case they then need to have them). ChrisA