Re: [Json] Nudging the English-language vs. formalisms discussion forward

Nico Williams <nico@cryptonector.com> Wed, 19 February 2014 17:40 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2379C1A00B8 for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 09:40:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.378
X-Spam-Level:
X-Spam-Status: No, score=-1.378 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Op07ikhPRw7 for <json@ietfa.amsl.com>; Wed, 19 Feb 2014 09:40:17 -0800 (PST)
Received: from homiemail-a89.g.dreamhost.com (caiajhbdcbef.dreamhost.com [208.97.132.145]) by ietfa.amsl.com (Postfix) with ESMTP id 403E71A01CE for <json@ietf.org>; Wed, 19 Feb 2014 09:40:16 -0800 (PST)
Received: from homiemail-a89.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a89.g.dreamhost.com (Postfix) with ESMTP id C6940318097 for <json@ietf.org>; Wed, 19 Feb 2014 09:40:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=exGObXQR4v53TxHcvTOE ESuAItM=; b=EAZsKLCC1+Y1ndOk3wZa+eLHoyRc5y0JIzUWTSVC9G9uiB/t92KY TibkOe9gmUUEMZXUDw5i0QPfO01hkvU6t8p9cGlNzGilpp8/Oa0Al6WU83JhPlfy 2nzD+kNRzqpeJCTGMk3Jsjk/UG0BzZg0BZtdlEzFxcJVeJ7pBJtjhb0=
Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a89.g.dreamhost.com (Postfix) with ESMTPSA id 35F08318096 for <json@ietf.org>; Wed, 19 Feb 2014 09:40:08 -0800 (PST)
Received: by mail-we0-f177.google.com with SMTP id t61so590679wes.22 for <json@ietf.org>; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hFsVvs1nzHe8U450NobvaARpImQuCAX6SXafE6EfymY=; b=XOQnYwRiZwL/hKIEa9nOWF116ZetYBy/Kv6ZsXOaWU+JCASM5CJ9xFc/we6VFbqBr9 chYrn65jtPsFviETpxD12xVIYpr/4TVd6L2mjAGZcDjL9TX+qb3g7eqNuqvEQTkoZFh3 iEdME20xDFiVfFuywZkiwTIKDS7inrKmYGRFTjWqybRkO3FIj2IIhn5mdTu9paNmTW2m LDByHrmUW3+dORTdsunnFvTlez4iIyeUevW2WLjmPiUbCL47Bx2jkiQoVOqNjGpltHNt 4LMKAL7xThVTZIfSlTAb+v4y77MeqsPmvC7phpdTamCNWrjzDJPgae3aazxnA64LTol7 moZA==
MIME-Version: 1.0
X-Received: by 10.180.98.35 with SMTP id ef3mr2697759wib.39.1392831605824; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
Received: by 10.217.108.132 with HTTP; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
In-Reply-To: <CAHBU6itzQ0rzU3EUYUqzm2qhx03qk1mpx2sehS_zeiw1ypcEgw@mail.gmail.com>
References: <C87F9B96-E028-4F0E-A950-B39D3F68FFE7@vpnc.org> <CAMm+LwhUh_yN-hzaoDWfrO_H2iGvYvj99BCE4EcYmgqCPqXoVQ@mail.gmail.com> <CAHBU6itpttXBfVQGKw=u==k_XSdrht81+m_YDNZP6RM+=9CNow@mail.gmail.com> <CAK3OfOjHkBFOzJSx=bhhoQJ8Z2bWyEXK52dNyYGWVb9FAj99ow@mail.gmail.com> <CAHBU6itzQ0rzU3EUYUqzm2qhx03qk1mpx2sehS_zeiw1ypcEgw@mail.gmail.com>
Date: Wed, 19 Feb 2014 11:40:05 -0600
Message-ID: <CAK3OfOhfjkbq6eREkt=MBVL1C9ubh-6My3Lvg-mnOxD0+cpN1Q@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Tim Bray <tbray@textuality.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/70yy8L9YsLHKf3McLJipOj92Jcg
Cc: Phillip Hallam-Baker <hallam@gmail.com>, Paul Hoffman <paul.hoffman@vpnc.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Nudging the English-language vs. formalisms discussion forward
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Feb 2014 17:40:20 -0000

On Wed, Feb 19, 2014 at 11:30 AM, Tim Bray <tbray@textuality.com> wrote:
> On Wed, Feb 19, 2014 at 9:20 AM, Nico Williams <nico@cryptonector.com>
> wrote:
>> My proposal is that the WG take all comers for JSON schema languages
>> as Informational and leave it at that (well, all proposals for which
>> there's enough authors and reviewers, enough interest).  That can't
>> even be an irritant for you: you can ignore them...
>
> No harm in that, although I also perceive little benefit.

So ignore them.  Advise against their use even.

> I think schemas can be useful (but designing good schema languages is
> horribly hard, and so easy to get wrong).

Hard?  Nah, it's just an exercise in re-inventing the same wheel
again.  XDR is really a subset of ASN.1, with different syntax, but
clearly it's possible to map XDR on ASN.1 trivially.  Ditto DCE RPC's
IDL.  And so on.

I really want any JSON schema to be expressed in JSON itself: we all
have JSON parsers, so at least the first step is done and we won't
have to worry about how difficult it is to write LALR(1) grammars for
ASN.1 or whatever.

> I think clear English prose is *essential*, the one thing a specification
> must have. Thus, schemas can be actively harmful if arguing over them
> distracts attention from crafting the prose properly.  This is particularly
> the case when the schema language is a flawed tool, which so many of them
> are.

English prose cannot be avoided.  For me it's about finding the
sweet-spot between formal language and English prose.  We could
publish code (remember SDL?) as a specification, but no one seriously
proposes _that_ (certainly not I).

> I also think that for most protocols, an open-source validator is immensely
> more useful than a schema. Validators can check semantic constraints that
> are in principle inaccessible to schema languages, especially simple ones.

What do you want to validate?  Form?  Then use schema; a form
validator not based on schema... is still a schema of sorts.

Or do you want to validate semantics?  That requires test-suites.
Perhaps we should publish test-suites, yes -- not a bad idea, except
for the enormous impact I think that would have on RFC authoring costs
and publication timelines.

Nico
--