From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59373) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izMKE-0002GZ-Ul for gwl-devel@gnu.org; Wed, 05 Feb 2020 10:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izMKD-0002VD-MW for gwl-devel@gnu.org; Wed, 05 Feb 2020 10:10:46 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21183) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izMKD-0002Lh-95 for gwl-devel@gnu.org; Wed, 05 Feb 2020 10:10:45 -0500 References: <871rrasdsl.fsf@elephly.net> From: Ricardo Wurmus Subject: Re: objections to short syntax for code snippets? In-reply-to: Date: Wed, 05 Feb 2020 16:10:36 +0100 Message-ID: <87eev9qdcj.fsf@elephly.net> MIME-Version: 1.0 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: zimoun Cc: gwl-devel@gnu.org zimoun writes: >> --8<---------------cut here---------------start------------->8--- >> process run-sh >> inputs >> . "a" >> . mine: "b" >> . "c" >> . yours: "d" >> # { >> echo "This is mine: {{inputs:mine}}, and this is yours: {{inputs:you= rs}}." >> } >> --8<---------------cut here---------------end--------------->8--- > > > This is cool! > > Aside your question, I am thinking if WISP could be adapted to use > dash '-' instead of dot '.' in the field 'inputs'. Tricky! The =E2=80=9C.=E2=80=9D in Wisp just means =E2=80=9Ccontinue the p= revious line=E2=80=9D. In this example it just looks really similar to a dash that=E2=80=99s used in = YAML to mark individual list items. We don=E2=80=99t need any of these dots. We could also just write this all= on one line (or any number of broken lines): process run-sh inputs "a" . mine: "b" "c" yours: . "d" # { echo "This is mine: {{inputs:mine}}, and this is yours: {{inputs:yo= urs}}." } This is equivalent, no difference whatsoever. So my use of the dot is very suggestive, but there=E2=80=99s no way we can = turn it into a dash. That said =E2=80=A6 macrology can be used to assign the dash special meanin= g (or no meaning at all), but I=E2=80=99m not convinced that this would be a good idea. Lists are easier in Lisp compared to YAML =E2=80=94 and thanks to wh= at I call =E2=80=9Cimplicit lists=E2=80=9D for the =E2=80=9Cinputs=E2=80=9D and = =E2=80=9Coutputs=E2=80=9D fields you don=E2=80=99t even need to start them with =E2=80=9Clist=E2=80=9D. It seems futile to tr= y to make lists more complicated by requiring that items begin with a dash. -- Ricardo