Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'programmer': 0.03; 'received:134': 0.05; 'subject:Python': 0.06; 'attribute': 0.07; 'debugging': 0.07; 'obligated': 0.09; 'operator,': 0.09; 'so?': 0.09; 'subject:language': 0.09; "'-'": 0.16; 'division.': 0.16; 'iirc': 0.16; 'lexer': 0.16; 'minus': 0.16; 'notation': 0.16; 'operator.': 0.16; 'personal,': 0.16; 'subject: \n ': 0.16; 'subject:?)': 0.16; 'subject:unicode': 0.16; 'symbols': 0.16; 'language': 0.16; 'wrote:': 0.18; 'properly': 0.19; 'slightly': 0.19; 'seems': 0.21; 'programming': 0.22; 'header:User-Agent:1': 0.23; 'finally,': 0.24; 'interpret': 0.24; 'mathematical': 0.24; "shouldn't": 0.24; 'math': 0.24; 'primary': 0.26; 'header:In- Reply-To:1': 0.27; "doesn't": 0.30; 'too.': 0.31; '(maybe': 0.31; '25,': 0.31; 'argue': 0.31; 'class': 0.32; 'probably': 0.32; 'skip:c 30': 0.32; 'programmers': 0.33; 'maybe': 0.34; 'could': 0.34; 'something': 0.35; 'point.': 0.35; 'instances': 0.36; 'should': 0.36; 'easily': 0.37; 'implement': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'access,': 0.60; 'middle': 0.60; 'march': 0.61; 'course': 0.61; 'such': 0.63; 'skip:n 10': 0.64; 'more': 0.64; 'school': 0.64; 'dont': 0.67; 'increasing': 0.74; 'power': 0.76; 'subject:this': 0.83; "'and'": 0.84; '8bit%:24': 0.84; 'borrow': 0.84; 'grave': 0.84; 'me;': 0.84; 'pardon': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAHiHMVOGuA9G/2dsb2JhbABZhx+8WIMOgTGDGQEBAQMBIw8BRQYLCxgCAgUWCwICCQMCAQIBRRMIAodtCKxNm2WGWxeBKYx3VRaCWYFJBJhNhjWLfYFwgT8 Date: Tue, 25 Mar 2014 14:43:09 +0100 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.3.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Time we switched to unicode? (was Explanation of this Python language feature?) References: <9daf0806-02de-4447-964c-c8f8953c23e5@googlegroups.com> <0b78649a-16b3-4410-8258-e859578d62be@googlegroups.com> <281c8ce1-4f03-4e93-b5cd-d45b85e89e7e@googlegroups.com> <2f646b95-7d73-4a60-a222-96fa3cd219df@googlegroups.com> In-Reply-To: <2f646b95-7d73-4a60-a222-96fa3cd219df@googlegroups.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395754991 news.xs4all.nl 2948 [2001:888:2000:d::a6]:60769 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69025 On 25-03-14 13:53, Rustom Mody wrote: > On Tuesday, March 25, 2014 4:08:38 PM UTC+5:30, Antoon Pardon wrote: >> So? We do use + -, so why shouldn't we use × for multiplication. Would >> such a use already indicate I should use a mathematical front-end? >> When a programming language is borrowing concepts from mathematics, >> I see no reason not to borrow the symbols used too. > Well... > Matters of taste are personal, touchy-feely things and not easily > explainable. > > Some of mine: > * for multiply does not bother me; ** for power for some reason does. > Even though the only standard math notation is non-linear and is off-limits > > 'and' bothers me slightly (maybe because I was brought up on Pascal?) > '&&' less (and then C) > ∧ is of course best (I am a Dijkstra fan) > [But then Dijkstra would probably roll over and over in his grave at > short-circuit 'and'. Non-commutative?!?! Blasphemy!] > > ÷ for some reason seems inappropriate > (some vague recollection that its an only English; Europeans dont use it??) > It doesn't bother me. IIRC in primary school before fractions were introduced, > a colon was used to indicate division. > > And if we had hyphen '‐' distinguished from minus '-' then we could have lispish > names like call‐with‐current‐continuation properly spelt. > And then generations of programmers will thank us for increasing their > debugging overtime!! > Sure we could argue some partciculars. Personnaly I would prefer an up-arrow for exponentiation. IMO the advantage would be mainly in allowing more disambiguity. So that if you as a programmer think about something as an operator, you are not obligated to somehow force it into the mold of + - * / % //. If → would have been used for attribute access, then we could just write 5→to_bytes(4, "little") without having to consider that the lexer would try to interpret it as a floating point. And maybe ⤚ could have been used for concatenation. Which would mean that if you had a class whose instances could both be added and concatenated, you could implement both as an operator. Finally, I think I would prefer the middle dot ⸱ for lispish names so we would have call⸱with⸱current⸱continuation.