Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s6ANOHPx032689 for ; Fri, 11 Jul 2014 01:24:18 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx006) with ESMTPS (Nemesis) id 0M4SuS-1WgJpH37r2-00yerO for ; Fri, 11 Jul 2014 01:24:11 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6ANLaA2010874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jul 2014 01:21:36 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6AM14YQ001467; Fri, 11 Jul 2014 01:21:35 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11111896 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Jul 2014 01:21:35 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s6ANLZi2007162 for ; Fri, 11 Jul 2014 01:21:35 +0200 Received: from mail-qc0-f174.google.com (mail-qc0-f174.google.com [209.85.216.174]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s6ANKmsk004988 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 11 Jul 2014 01:20:51 +0200 Received: by mail-qc0-f174.google.com with SMTP id x13so280240qcv.19 for ; Thu, 10 Jul 2014 16:20:48 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.96.38 with SMTP id j35mr80176363qge.5.1405034448247; Thu, 10 Jul 2014 16:20:48 -0700 (PDT) Received: by 10.96.212.1 with HTTP; Thu, 10 Jul 2014 16:20:48 -0700 (PDT) References: <539432A6.7030205@clear.net.nz> <5395A7A3.7040106@residenset.net> <5395AA02.8040704@morningstar2.co.uk> Content-Type: text/plain; charset=UTF-8 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id s6ANLZi2007163 Message-ID: Date: Thu, 10 Jul 2014 19:20:48 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Juxtaposition in l3fp To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <5395AA02.8040704@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id s6ANLaA2010874 Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:vFGA3bK2kdk=:u4+ad1NvpmO0GWEofEBlMtb1qb Z1jzxzQ+HW9pySKG2CoVZEocY3EugzK05kMjadzYmmJcrHgcg4M4f0irtdaV/jnwHxzoVH6Nc qF7lli10eEQbZ66Tq77J9M8zzYKkVpI42/M5pGDPXgFSkD5J6lBepD+ry8Xo1w3a7Srv9meTT WdPldRJs5FA4msWLnNVnlVe9EXX7tHPQdQPZ7IdwYUX0RJZ59XzZ+qcFH9YPuy0/yJxaWT7ns 9n3mliSybBxTzhJ0nKh/OjYTjdShk8UghQkqEhLhGpKwikbtDYj1BLnUiGlHLdIUDHqApg+Mw nT/v7pcobo7bsf+RjPrUIVLJYg+b+D5Dt39JJurcKll/lUtDMYTRSOqK+SklQ/4SNLD0jOowG McJfiE74Z8S/+SMY0XAnPjhrAAUYf5sEA0AgHXvgx/1RW2I5c8njapPfb0skVkq3XbvLtiSLm 3Ulh8EVKp9+5Hez2r4JaICdgmKnuXx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XbpSSXuBaagnz6Kl+aCwGnCGuV321TluGJ0eE8/gKYZr7v57JwgqtBOS lBxNHzqpOML0XsQ+BjNER19/UTRQVtlS X-UI-Loop:V01:IgPgqxXO9JM=:mfrLOpcL9mjVt3GjrF185Dl/BcpCgfw2gMztQ+mx0PI= Status: R X-Status: X-Keywords: X-UID: 7539 Hello list, Sorry for the >1 month delay. This is a followup to the thread asking whether letting juxtaposition denote multiplication was a good idea. I think it was, but I made a big mistake in making juxtaposition be multiplication with a _different precedence_ than the asterisk. On 6/9/14, Joseph Wright wrote: > On 09/06/2014 13:25, Lars Hellstr=C3=B6m wrote: >> A data point of possible interest is MetaFont, which has some cases of >> juxtaposition as a high priority operation (e.g. 2/3x means two thirds >> of x). Since it's Knuth, it's probably very consistent, but not >> necessarily intuitive. > > I guess Bruno can say more, but I suspect that requiring explicit "*" > for multiplication might have a benefit in terms of code complexity (no > need to allow for other cases). An obvious question for me is would suc= h > a position lead to problematic cases? The comparison with MetaFont is > probably a useful one in this regard. From reading (short) old discussions on when I decided to allow juxtaposition, MetaFont was indeed an inspiration for making juxtaposition bind very tightly. Another inspiration was pgfmath, which allows juxtaposition for dimensions only, and treats a number and its dimension as a single operand for any operation: \input pgfmath \pgfmathparse{.25pc^2} \show\pgfmathresult % gives (.25*12pt)^2 =3D 9.0 In l3fp, I pushed the idea to its extreme, allowing juxtaposition for things other than units, and I kept the precedence as being the tightest possible. As Lars rightfully says it's "consistent, but not necessarily intuitive". Andrew has given several cases where my choice leads to a terrible behaviour for l3fp, and there is basically no case where the current behaviour is better (well, there was one abusive one: with this rule, exp.5ln(...) computes the square root, but now that is not needed). I'm keen on leaving juxtaposition =3D multiplication, because that allows to use dimensionful numbers directly inside fp expressions (pt, in, ... are defined as floating point constants). I believe that we should change the precedence of juxtaposition-as-multiplication from what it currently is (the tightest) to being the same as multiplication. In other words, juxtaposition would behave exactly identically to adding an asterisk. Would that make sense? Am I missing something crucial (probably... I didn't realize when allowing juxtaposition what a mess I was creating)? Best regards, Bruno