Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Mon, 25 Jul 2016 07:08:46 +1000 Lines: 92 Message-ID: References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <20160723082947.7cae8bd1@imp> <87fur0a44p.fsf@elektro.pacujo.net> <20160723095441.29562c54@imp> <57939373$0$1586$c3e8da3$5496439d@news.astraweb.com> <5794b1d7$0$1620$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de o5n3V55zjgQ/Ia44+i3R4wptODJ+ejH4EMtPpgl2OK+Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'ignored': 0.05; 'counting': 0.07; 'problem?': 0.07; 'subject:code': 0.07; 'cc:addr :python-list': 0.09; '(ie.': 0.09; 'argument,': 0.09; 'declarations': 0.09; 'english,': 0.09; 'parsed': 0.09; 'subject:Why': 0.09; 'python': 0.10; 'language,': 0.11; 'subject:not': 0.11; 'applies': 0.15; 'argument': 0.15; 'languages,': 0.15; 'things.': 0.15; '(there': 0.16; '*never*': 0.16; '2016': 0.16; 'ahead!': 0.16; 'build.': 0.16; 'decent': 0.16; 'declaration': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; 'insisted': 0.16; 'it".': 0.16; 'languages)': 0.16; 'learns': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:allow': 0.16; 'sure.': 0.16; 'unusable.': 0.16; 'wrote:': 0.16; 'module,': 0.18; 'thanks.': 0.18; 'language': 0.19; '(not': 0.20; 'windows': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'saying': 0.22; "aren't": 0.22; 'aspect': 0.22; 'parser': 0.22; 'recognize': 0.22; 'simpler': 0.22; 'text,': 0.22; 'am,': 0.23; 'code,': 0.23; 'code.': 0.23; 'plain': 0.24; 'written': 0.24; 'header:In-Reply- To:1': 0.24; 'feature': 0.24; 'mon,': 0.24; "i've": 0.25; "doesn't": 0.26; 'example': 0.26; '(which': 0.26; 'chris': 0.26; 'external': 0.27; 'message-id:@mail.gmail.com': 0.27; 'actual': 0.28; '(maybe': 0.29; '(my': 0.29; 'complain': 0.29; 'equally': 0.29; 'sure,': 0.29; 'convert': 0.29; "i'm": 0.30; 'that.': 0.30; 'too.': 0.30; "i'd": 0.31; 'fixed': 0.31; 'everyone': 0.31; 'anyone': 0.32; "can't": 0.32; 'software,': 0.32; 'ideal': 0.32; 'language.': 0.32; 'getting': 0.33; 'problem': 0.33; 'usually': 0.33; 'html,': 0.33; 'smart': 0.33; 'open': 0.33; "i'll": 0.33; 'editor': 0.34; 'languages': 0.34; 'file': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'ones': 0.35; 'could': 0.35; 'text': 0.35; 'c++': 0.35; 'conditions.': 0.35; 'files,': 0.35; 'installing': 0.35; 'necessary.': 0.35; 'quite': 0.35; 'something': 0.35; 'level': 0.35; "isn't": 0.35; 'sometimes': 0.35; 'but': 0.36; 'there': 0.36; 'loaded': 0.36; 'tools,': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'expect': 0.37; 'there,': 0.37; 'beyond': 0.37; 'stuff': 0.38; 'anything': 0.38; 'someone': 0.38; 'files': 0.38; 'more': 0.63; 'here:': 0.63; 'you.': 0.64; 'soon': 0.65; 'materials': 0.67; 'production': 0.67; 'choose': 0.68; 'frustrated': 0.72; 'jul': 0.72; 'quality': 0.72; 'yourself': 0.73; 'life.': 0.81; 'chrisa': 0.84; 'depended': 0.84; 'difference.': 0.84; 'dumb': 0.84; "else's": 0.84; 'forced': 0.84; 'frustrating': 0.84; 'materials,': 0.84; 'one;': 0.84; 'pike': 0.84; 'treats': 0.84; 'ultimately,': 0.84; 'to:none': 0.91; 'grew': 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=ocvPNg2o0b0pnICrM0p86PppXfKJyCRse+a+/sPSUdE=; b=QF0AG9XHnjHHzFIlyyp23A9DdWj4qSXbaldlhHMML9tUAXPgl0XEVnNPZlDXdKOpGb XovkSMpIvhWa0uADUcijLNElR/6opRYDBAxMJruLtUMTTpqy/2hTgXzG4+2Ym7CVkOpi fZnKxmttO5WyoBeDPCVB+M9P3fCfNm+bVg9Y7MrhetRTMUrBe7JZn9e3oc91uYHpK4UJ bSvgV+J8gPHv+wE9Mq29GgWdKMEkvWlnrc372vbh2VCFn+9Q+uJRVlYVWC3FHC05F1uD t91aqM1Y4eiY+Ur7dOUhtzGdMbzYnQ4+4F9/EpgKP3wSJURkrpEKbxhSwGQbnwC8fq/e dGUA== 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=ocvPNg2o0b0pnICrM0p86PppXfKJyCRse+a+/sPSUdE=; b=YTv7HM1u6120Vld3y6G+NUtIhZ+8MAPc8J3oIt2ZEa5JK+9oBQIm6Z3ttxxWclM8Oq Mf7WMRJoRPdZBh9KEXtBixvhGZ7gCWMIaJpYOrNEOgJIFnmQPYxD+TCngGHB5pgISaR8 UZkbpWLUrjezckzNtO4v/jW/Ckf0+3H0GJ3FRSKDyP9COdd69EgCcXb3ugm1f/aZUGcF sk3RXIxkEn3tHikunnEj4OfRgcaLdvDjNi9yKBfLFp//sMOIIyOMLzwGL6gwTK2Jm8Tc 9JS9M4IlWizseL3cjie103/ASGheL8numeK2R9lPfymbOP8+RdT32fzumEPj/P3n35Gs DFaQ== X-Gm-Message-State: ALyK8tIX2AO9mtM0WhZOPk4QDLlXNLgE/H3kn+yhvYEC+y1Ajm8cN/MGSco7TWzogeM9CSBPd/7MU+0t9Ks+Nw== X-Received: by 10.28.50.199 with SMTP id y190mr35753611wmy.61.1469394527669; Sun, 24 Jul 2016 14:08:47 -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: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <20160723082947.7cae8bd1@imp> <87fur0a44p.fsf@elektro.pacujo.net> <20160723095441.29562c54@imp> <57939373$0$1586$c3e8da3$5496439d@news.astraweb.com> <5794b1d7$0$1620$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:111838 On Mon, Jul 25, 2016 at 6:03 AM, BartC wrote: > On 24/07/2016 20:00, Chris Angelico wrote: >> >> On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: > > >> A skilled craftsman in any field will choose to use quality tools. > > Materials (ie. languages) are important too. Materials, tools, same difference. (Not sure I could even draw the line in software, and ultimately, my line of argument applies equally to both.) >> So why do you use >> "dumb editor" as a line of argument, rather than getting a smarter >> editor? > > > Perhaps because I prefer to use my own languages and I don't have anyone > writing the specialist tools for me that would be necessary. So because you've chosen to use your own languages, you are frustrated at Python because you're not using a decent editor? Get yourself something nice and configurable, so that when you open a Python file it gives you the features you need. I use SciTE, and it quite happily is currently working with text, Pike, Pike Module, reStructuredText, HTML, SRT, and Python files, and that's counting only the ones that I have loaded in it right at this instant. Had some C files up recently (both .c and .h - was editing CPython), and various other things. SciTE doesn't recognize .srt files, so it treats them as plain text - as in, like a dumb editor would. Even if your own language can't be parsed using any existing parser (adding language support usually isn't that hard, if the same parser can be reused), you can still make use of smart editor features for all other languages you work with. Why is this such a problem? Why is it so hard? >> I don't have a lot of sympathy for people who use suboptimal tools and >> expect everything to work for them. Sure, sometimes you're forced to >> use something less than ideal (maybe you're stuck on someone else's >> Windows box and good tools simply aren't there, and you can't go >> installing a ton of stuff just to get started), but then you KNOW >> you're working in bad conditions. You don't make that your normal >> life. > > Some of us are used to working with minimalist tools and can be extremely > productive with them. And then you complain that the language is "fragile" or in some way frustrating to you. Because you've restricted yourself to minimalist tools. Go ahead! Be productive. I'm sure there are people out there saying "I'm used to working with C and can be extremely productive with it". Let 'em. Me, I'll use high level languages and be even more productive. Thanks. > But since you used some C, let me give an example of poor design from that > language (there are plenty; I've written up quite a big collection of them). > > You might know that type declarations in C, as soon as you go beyond the > basics, become completely impossible and convoluted. I've never managed to > get my head around them. > > There are utilities such as 'Cdecl' that are used to convert a C declaration > to English, and vice versa. That's how good a feature they are! > > So what would have been a better solution here: to have fixed the language, > or to have grafted on a simpler type declaration scheme that could co-exist > with the old one; or to have ignored the problem and depended on using > external tools? > > Or just insisted that everyone learns that arcane aspect of C, despite it > being unreadable and error-prone. When do you get those uber-convoluted declarations in C? Sure, they come up in C++ (which is why the language grew some features to manage that complexity), but outside of demonstration code, when do you get actual declarations of massively-nested constructs? I've literally *never* seen them - not rarely, NEVER - in production code. > (My own solution is that I use a home-made language in place of C, which has > fixed most such problems. So my main 'tool' is a custom-made language. > > And for block delimiting, it uses neither tabbed indents or braces!) Sure. You're most welcome to use that. But it doesn't mean that Python is unusable. Plus, I'd much rather trust Python in production than something custom-made, even by me. The performance, reliability, and security of a well-respected language far outstrip anything I could build. ChrisA