From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:48425) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izQ8F-0000E0-A5 for gwl-devel@gnu.org; Wed, 05 Feb 2020 14:14:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izQ8E-0003AK-0H for gwl-devel@gnu.org; Wed, 05 Feb 2020 14:14:39 -0500 MIME-Version: 1.0 References: <871rrdthmz.fsf@elephly.net> <87lfpjswla.fsf@elephly.net> <87blqcrjuz.fsf@elephly.net> In-Reply-To: <87blqcrjuz.fsf@elephly.net> From: zimoun Date: Wed, 5 Feb 2020 20:14:24 +0100 Message-ID: Subject: Re: Comments on process template syntax Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+kyle=kyleam.com@gnu.org Sender: "gwl-devel" To: Ricardo Wurmus Cc: gwl-devel@gnu.org Hi Ricardo On Wed, 5 Feb 2020 at 19:04, Ricardo Wurmus wrote: > > Does it make sense to expand "process: proc arg" as "process : proc arg= "? > > Well, disallow the colon ':' in all the name (symbol) and then expand. > > This is not easily accomplished because =E2=80=9C:=E2=80=9D is a valid ch= aracter in a > symbol. So I=E2=80=99d have to replace the reader to disallow =E2=80=9C:= =E2=80=9D in symbols. > That=E2=80=99s a very big intervention. Ok. It was just an idea. :-) > > Because this space is a drawback of Wisp, I mean at least to me. > > Especially coming from Python where the standard is to have "def > > proc(arg):" and not "def proc(arg) :". > > I see what you mean. The =E2=80=9C:=E2=80=9D on its own is just the Wisp= way of saying > =E2=80=9Cwrap the rest of this line in parentheses=E2=80=9D. In Haskell = that=E2=80=99s =E2=80=9C$=E2=80=9D. In > both cases it=E2=80=99s separate from any identifiers. The dollar '$' appears to me a better choice than the colon ':'. Because the colon is used in plain English and often used elsewhere without space (YAML, python, etc.). It is about habits. Well, that's another story. :-) > In the Python case the =E2=80=9C:=E2=80=9D serves no real purpose as far = as I can tell. Hum? The colon ':' serves as separator used by the parser, AFAIU. I mean the colon ':' is part of the Python grammar. https://docs.python.org/3/reference/grammar.html Well, that's another story again. ;-) > >> process list-file-template (filename) > > > > I find this one the clearer. > > Unfortunately, this one is not possible due to ambiguity in the process > macro as I explained in an earlier email. We can avoid this ambiguity > by adding =E2=80=9Cwith=E2=80=9D as extra syntax: Sorry I unqueued my emails in order. :-) > process list-file-template (with filename) > > It=E2=80=99s not perfect, but I don=E2=80=99t see another way that would = be any clearer. I am fine with the 'with' keyword. > process list-file-template with this that anything whatever As I said elsewhere, I am not bothered by the previous syntax. And I find equivalently nice the both using 'with'; without or with parenth= esis. > I honestly can=E2=80=99t tell which of the options is better. It=E2=80= =99s like saying > the word =E2=80=9Ctable=E2=80=9D 50 times in a row and wondering what the= se odd sounds > really mean=E2=80=A6 :-D Aside, the 'process' macro should be renamed as Kyle mentioned it. Because it is confusing, IMHO. Thank you for all these new inputs on GWL. Cheers, simon