Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'operator': 0.03; 'classes,': 0.05; '(using': 0.07; 'string': 0.09; 'occasionally': 0.09; 'okay': 0.09; 'subject:language': 0.09; "'+'": 0.16; 'choose,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'functions;': 0.16; 'happily': 0.16; 'it),': 0.16; 'language': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'separate': 0.22; 'java': 0.24; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'apparently': 0.31; 'division': 0.31; 'class': 0.32; 'interface': 0.32; 'everyone': 0.33; 'could': 0.34; 'subject: (': 0.35; "can't": 0.35; 'something': 0.35; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'nov': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'supporting': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'number,': 0.60; "you'll": 0.62; 'name': 0.63; 'choose': 0.64; 'different': 0.65; 'designers': 0.74; 'power': 0.76; 'overloading': 0.84; 'usage.': 0.84; 'convinced': 0.93; 'rick': 0.93; '2013': 0.98 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=VPj7NeKZ8kOfkQ+rKwrdP3cnW/ka1gGV+8MRxsxcf1c=; b=PtLUL0CJo740JRwfHprQtlQ1TCHk3IShYF1tKT72e/oGAh3IySLQQ692mBXJovzI6d pUeTAPKXtWrNonHaCCt0260dEWXfiYAVamLc2fOqzErB4Zp97bqHIHfrUvHxGV/BZm0Q JBTCSJlkPjDFxNeScdAF1kgh2IYaJmKb94m3i4zKM3MTsfTd4Q+zePgnZSJs9xH6Uedc gSL60LYO3kJKejZw2qGR/R3m3pxCRsT9CbAZkYjaTj/J+h++qE8OWEvQlA5GKY/aAIvn 7AznpHlhcg9/s83eBaWTq9kv7bGMWscTU5gnmQF6KQarxI/wslSHIfBXW5M0reRTv+5y rAQw== MIME-Version: 1.0 X-Received: by 10.69.31.97 with SMTP id kl1mr1761819pbd.127.1384757793219; Sun, 17 Nov 2013 22:56:33 -0800 (PST) In-Reply-To: References: <1f0ffad0-f9b1-4154-b048-510d8e38846e@googlegroups.com> Date: Mon, 18 Nov 2013 17:56:33 +1100 Subject: Re: Oh look, another language (ceylon) 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384757801 news.xs4all.nl 15906 [2001:888:2000:d::a6]:56411 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59837 On Mon, Nov 18, 2013 at 5:45 PM, Gregory Ewing wrote: > Rick Johnson wrote: >> >> The multiplication operator can ONLY be used on >> numerics. > > > I'm not convinced about that part. I notice that > subtraction, multiplication and division are bundled > into a single interface Numeric, but there is a > separate one called Summable for addition -- > apparently so that they could use + for string > concatenation. > > This seems to be a case of one rule for the language > designers and a different one for everyone else. > If it's okay for '+' to be used on something that's > not a number, why not '*'? That's something Java did (using + for strings, but not supporting operator overloading for custom classes, so you can't make your own string-like or number-like class and use + with it), and IMO it's one of the language's annoying flaws. Give people the power to use whatever operator they choose in whatever way they choose, and accept that occasionally you'll get less-than-stellar usage. It's a cost that you pay happily when you let people name their own functions; why not give the same freedom for operators? ChrisA