Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: (Execution) Termination bit, Alternation bit. Date: Wed, 23 Dec 2015 02:56:51 +1100 Lines: 27 Message-ID: References: <9Bldy.3723$Bz5.1578@fx04.iad> <864af$56760c5f$d47876e2$48630@news.ziggo.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de C6ziegEz+pcs42YTUP9V1AX3f+0uNe6WbJMvKuKv/bbA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'pop': 0.05; 'executed': 0.07; 'cc:addr:python-list': 0.09; 'instruction.': 0.09; 'bug': 0.10; 'exception': 0.13; 'stack': 0.13; 'wed,': 0.15; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'massively': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:bit': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'fix': 0.21; 'programming': 0.22; 'am,': 0.23; 'bit': 0.23; 'dec': 0.23; '(most': 0.24; 'header:In- Reply-To:1': 0.24; 'skip:" 20': 0.26; 'least': 0.27; 'message- id:@mail.gmail.com': 0.27; 'idea': 0.28; 'flying': 0.29; 'termination': 0.29; "i'm": 0.30; 'work.': 0.30; 'code': 0.30; 'subject:) ': 0.32; 'problem': 0.33; 'languages': 0.34; 'previous': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'done': 0.35; 'fail': 0.35; 'level': 0.35; 'received:209.85': 0.36; 'received:209': 0.38; 'skip:p 20': 0.38; 'means': 0.39; 'sure': 0.39; 'some': 0.40; 'protection': 0.60; 'save': 0.60; 'high': 0.60; 'back': 0.62; 'here.': 0.62; 'research': 0.62; 'here': 0.66; 'offer': 0.66; 'talking': 0.67; 'yourself': 0.73; 'chrisa': 0.84; 'rediscovered': 0.84; 'to:none': 0.91; 'trouble.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=4GB2cSUDE3MPYzsmeRiJEG13M6sb4aDncLj6/LnmcZA=; b=u7NDQe39IHnjWFf65qrhqx5jZS+uKRXtJNJMe6nTaTW7fBHDxvV6pPnry+z+DfxkFQ vjUo7lnuLIBv5fXRp0xZ2e1QCnGVf/78kDBeVTISNubCJ16CTomNSsQKZd8YCTOT/08w g+Ry4/ouhmd7pmcX37GgFT9BlNWyyRKYKGzgRMr0EpNx62iHMMLJnFeH6ghm2LDzQtNc iC6kdhMlDPjKolKPQavBrgkLNqwX4WVUuDwMCeHtdso3e/o1RX9UQfKlw5Dtcl6acbBJ ZDssuqkve99QH1Gma3g/YacHJRPf0uAt3VSemhsTzdkUI+U0eydzAP5/AjpIQ9grGSC8 jzjw== X-Received: by 10.107.40.76 with SMTP id o73mr21161765ioo.157.1450799811920; Tue, 22 Dec 2015 07:56:51 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100735 On Wed, Dec 23, 2015 at 2:46 AM, Skybuck Flying wrote: > One idea which immediatly comes to mind to fix this problem is to offer a > "PushTerminationFlag" onto stack and then a "ClearTerminationFlag" > instruction. > > Then a code section can be executed without breaking or terminating. > > Once that's done the code would then call "PopTerminationFlag". > > At least this offers some protection against arbitrarely breaking code > sections. Congratulations! You've just rediscovered 'critical sections'. So... what happens if there's a programming bug that means you fail to pop the termination flag? Wouldn't it be so nice if you could use... exception handling? Here on python-list/comp.lang.python, we have all those high level facilities. We don't need new CPU-level features to make this work. Are you massively cross-posting? Either way, this is pretty off-topic for here. Read up a bit on what's already been done (most of what you're talking about was already solved back in the 1990s when I was programming on OS/2, and I'm pretty sure the solutions were all lifted directly from mainframe research in previous decades), or just use high level languages and save yourself a boatload of trouble. ChrisA