Re: [core] Comments on draft-ietf-core-yang-cbor-00

Ladislav Lhotka <lhotka@nic.cz> Mon, 23 May 2016 12:06 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C234112D703 for <core@ietfa.amsl.com>; Mon, 23 May 2016 05:06:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.426
X-Spam-Level:
X-Spam-Status: No, score=-8.426 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.426] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 fhsd4sORO3KQ for <core@ietfa.amsl.com>; Mon, 23 May 2016 05:06:31 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1805A12D76F for <core@ietf.org>; Mon, 23 May 2016 05:06:27 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:19c4:f68e:489c:53ba] (unknown [IPv6:2001:718:1a02:1:19c4:f68e:489c:53ba]) by mail.nic.cz (Postfix) with ESMTPSA id 0A7876099D; Mon, 23 May 2016 14:06:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1464005185; bh=tEkl6l7OXRJRBbvh7X6pdduIQ02J5B6PXDz7NI/qDEE=; h=From:Date:To; b=JOcI6gL1T/EIXqjEevlhw5TNOJ8kIqS9+kFXSLOoUyd97LuSOv2/7DK+vjjMxT4ui ihDqqDTQxvGeokf90S9TXLUb6cg8eRao7gzi/mXbL1F2/ke1CtCkqcZlIqTTnMXkD7 kSkoi5j2iQOW9PGi7q3f1V9lQx/L0LapF0BdvkHk=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <5742E600.1010503@tzi.org>
Date: Mon, 23 May 2016 14:06:27 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <A943AA3B-027A-43C6-8E1B-36F338EAE3B5@nic.cz>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401CC2.2040002@tzi.org> <m237p99gnw.fsf@birdie.labs.nic.cz> <5742E600.1010503@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3124)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/MaoBVsipI3B0AHrfPPT2TrknHOs>
Cc: Core <core@ietf.org>
Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 May 2016 12:06:34 -0000

> On 23 May 2016, at 13:14, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Ladislav Lhotka wrote:
>>> We were thinking about possibly adding CBOR tags to disambiguate this.
>> 
>> This might be a good idea anyway because resolving a union type may
>> involve, e.g., (repeated) regular expression matching.
> 
> Right, minimizing the complexity of the matcher is a good objective.
> 
> Now, how do we use tags to identify the alternatives in the union?
> As far as I understand, these can be moved around when the module is
> updated.
> How do people handle this in their software?

I think they mostly follow the procedure as specified in 6020. Unions are usually not defined to make this really hard. For unions like "inet:host" or "inet:ip-address" it often needn't be done at all because many library functions directly accept all member types.

Lada

> 
> Grüße, Carsten
> 

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C