Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: Statements as expressions [was Re: Undefined behaviour in C] Date: Mon, 28 Mar 2016 11:27:31 -0700 Organization: A noiseless patient Spider Lines: 9 Message-ID: <878u125ugc.fsf@nightsong.com> References: <56f55e2e$0$1619$c3e8da3$5496439d@news.astraweb.com> <87wpoq1omm.fsf@elektro.pacujo.net> <56f5f81d$0$1585$c3e8da3$5496439d@news.astraweb.com> <87io0a6j1w.fsf@nightsong.com> <56f67ee3$0$1583$c3e8da3$5496439d@news.astraweb.com> <87poug5t0c.fsf@nightsong.com> <1344e2bf-15d2-412e-9512-b0aba800dada@googlegroups.com> <56f880ba$0$1617$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ac130717aa033f117b1251f50cb4c61b"; logging-data="11825"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199FdDLcoufEOR6aabxdvPx" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:cWc9VF/D+vR9wjZvlzw/aOxn0PQ= sha1:0Cz4oJ0UWiwl29wyDp0gB57hHbA= Xref: csiph.com comp.lang.python:105916 BartC writes: > With more recent ones I've dropped that model, so that statements and > expressions are different, and that is strictly enforced. This makes > implementation simpler, and detects lots more errors. You should try Haskell, where there are only expressions, but the ones that perform actions can be separated from the other ones through the type system, so using one in the wrong place raises a compile time type error.