Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'syntax': 0.03; 'subject:Python': 0.05; 'arguments': 0.07; 'incompatible': 0.07; 'rejected': 0.07; 'tends': 0.09; 'type;': 0.09; '"this': 0.13; 'language': 0.14; 'dec': 0.15; 'sat,': 0.15; '"*"': 0.16; '"g"': 0.16; 'boolean': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'grounds': 0.16; 'negation': 0.16; 'operators,': 0.16; 'slash': 0.16; 'wrote:': 0.17; 'variable': 0.20; 'comfortable': 0.20; 'programming': 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'possibly': 0.27; 'instead.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'dan': 0.29; 'division': 0.29; 'piece': 0.29; 'manual': 0.29; "i'm": 0.29; 'sense': 0.31; 'code': 0.31; 'ones,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'open': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'characters': 0.36; "wasn't": 0.36; 'two': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'short': 0.39; 'where': 0.40; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'skip:n 10': 0.63; 'more': 0.63; 'beat': 0.65; 'beside': 0.84; 'confusing': 0.84; 'fast,': 0.84; 'favour': 0.93; 'instantly': 0.93 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:to :content-type; bh=716/EQG8ZTBaDEbl+WQ3DCKhB92XC0uXu0+1pNPlcW4=; b=thPGlkNfS1beoKci5vX3Z7YKPobgEXlCankN/ComHHKULhtC2QpP6fGRoNiNe8QZgm /ENa1pGBmZDUMYy6bQz3ngxppQMqIVGYi5Nwou9WP7wILyKVz5f4p9BtXYS93UvdGFA8 H6WC27dk1uwxhVXz5uV72zqMyBDbOhU7LKMI4i5kQ/IMnT0v4n+HmRcclWqXP6QbtRdg EKF3irvaVJkz4q0+YbTx0RyMTUVsV8kV6PCihBXb4id75AC96vRZZ0gdsrmhEA5KR0lz uwZVPZKwrhGASdH9EMGETd5mhvM6osq1f73aOMLZ/iGXuQqa43WckmC1hfxWYayklVDl 6yyA== MIME-Version: 1.0 In-Reply-To: References: <44335f22-555a-4806-b24a-7d4cb1d8e529@googlegroups.com> <4ddee631-b5b5-4cb4-82b0-00ca403b773e@googlegroups.com> <30bf668f-56e5-482f-b540-5cfa136348d1@googlegroups.com> <62459a43-88e7-4619-9742-a88021bb06ee@googlegroups.com> <50d593e1$0$29967$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 23 Dec 2012 08:49:31 +1100 Subject: Re: Brython - Python in the browser From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356212981 news.xs4all.nl 6972 [2001:888:2000:d::a6]:50919 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35393 On Sun, Dec 23, 2012 at 7:31 AM, Dan Sommers wrote: > On Sat, 22 Dec 2012 23:11:00 +1100, Chris Angelico wrote: > >> "This is a string" / 3 ==> ["This ", "is a ", "strin", "g"] >> and "This is a string" // 3 ==> ["This ", "is a ", "strin"] >> then "This is a string" % 3 ==> ["g"] or possibly "g" >> >> which is incompatible with current usage. But that's a meaning that >> makes reasonable sense as "modulo". > > So why are we all so comfortable with using "*" as the operator for > multiplication? I'm sure that a new programming language that dared to > use U+00D7 or U+2715 for multiplication would be instantly rejected on > the grounds that it was confusing and incompatible with current practice. Less on the confusing and more on the hard to type; same reason we don't indicate division by writing a long bar, but use the slash instead. Also, algebra has a tendency toward short variable names, where programming tends toward longer ones, so algebra optimizes in favour of multiplication - that's why we don't write code like "h{ello}w{orld}" to mean "multiply hello by world". > Until recently, the number of characters available to a programming > language was limited (APL notwithstanding). REXX had two boolean negation operators, one of which wasn't ASCII. > Practicality beat (paste tense) purity. Yep. Definitely. We need to be able to type code fast, read code fast, and worry about algebra slowly. Arguments from algebra are mainly for justifying a new piece of syntax so people can understand it without having to keep the manual open beside them. ChrisA