Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Promoting Python Date: Wed, 06 Apr 2016 17:14:13 +0300 Organization: A noiseless patient Spider Lines: 26 Message-ID: <87zit6lt8q.fsf@elektro.pacujo.net> References: <87h9ffgdtr.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="16685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18i+A/8Oz+lcLWSmZUe5tlo" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:HteX49z1LBjtrBlB/Lg+oaQx1aM= sha1:2nLeNVUFKfNMohRuVmNwcepSdD8= Xref: csiph.com comp.lang.python:106580 Michael Selik : > On Wed, Apr 6, 2016, 12:51 PM Marko Rauhamaa wrote: > >> Really, there's only one high-level construct you can't live without: >> the "while" statement. Virtually every Python program has at least >> one "while" statement, and in general, it is unavoidable. >> >> Basic programs, on the other hand, don't need that meaningless >> buzzword, but can live just fine with GOTO. > > You don't need WHILE or GOTO, you can just copy-paste code. You > probably need an IF at some point. Seriously, Python wouldn't be, couldn't be Turing-complete without "while" (mainly because it doesn't support tail-recursion elimination). Now, if Python had an unlimited range() iterator/iterable, you could use a "for" statement to emulate "while". As it stands, Python without "while" could only compute primitive-recursive functions. However, you only need "while" a maximum of one time in your whole program to perform an arbitrary computation. Marko