Re: [yang-doctors] guideline for enum and value?

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Wed, 14 February 2018 18:52 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B83E412D837 for <yang-doctors@ietfa.amsl.com>; Wed, 14 Feb 2018 10:52:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=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 9aKr0Edu5EX7 for <yang-doctors@ietfa.amsl.com>; Wed, 14 Feb 2018 10:52:37 -0800 (PST)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 76A0812D84C for <yang-doctors@ietf.org>; Wed, 14 Feb 2018 10:52:37 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 3C214B0E; Wed, 14 Feb 2018 19:52:36 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id U5X35u-3vuAH; Wed, 14 Feb 2018 19:52:35 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Wed, 14 Feb 2018 19:52:36 +0100 (CET)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id 2199E20151; Wed, 14 Feb 2018 19:52:36 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id mXlTLqbvUc8c; Wed, 14 Feb 2018 19:52:35 +0100 (CET)
Received: from elstar.local (unknown [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 88ADD20150; Wed, 14 Feb 2018 19:52:35 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 9A52542479D3; Wed, 14 Feb 2018 19:52:34 +0100 (CET)
Date: Wed, 14 Feb 2018 19:52:34 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: "Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com>
Cc: "Benoit Claise (bclaise)" <bclaise@cisco.com>, Martin Bjorklund <mbj@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Message-ID: <20180214185234.mfek2udzgyqoq3lq@elstar.local>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: "Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com>, "Benoit Claise (bclaise)" <bclaise@cisco.com>, Martin Bjorklund <mbj@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
References: <20180125.095921.224499312159563778.mbj@tail-f.com> <20180125091118.tjn5eiv2hzmc7k23@elstar.local> <dfb94426-c408-e215-e23b-539e127050a2@cisco.com> <20180125.120804.68412726225731762.mbj@tail-f.com> <0db2c4d1-ac4d-dcc6-b2b9-c580427a6a84@cisco.com> <20180214154740.l375k2kmodgvzvdx@elstar.local> <20180214155951.eqaskkjs67bt6zjc@elstar.local> <748E69BA-6AF6-405D-BAEC-CBB3DF58F70D@cisco.com> <20180214165213.gu6dngw5c75j2sfh@elstar.local> <CC7AD2F2-0CC5-4444-85CB-FA73AA072073@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CC7AD2F2-0CC5-4444-85CB-FA73AA072073@cisco.com>
User-Agent: NeoMutt/20171215
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/kQfkM2hf6Jq8bxeZawRGDh7dPcQ>
Subject: Re: [yang-doctors] guideline for enum and value?
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Feb 2018 18:52:42 -0000

On Wed, Feb 14, 2018 at 06:41:52PM +0000, Einar Nilsen-Nygaard (einarnn) wrote:
> Juergen,
> 
> The CBOR text does not invalidate the rationale I have discussed below. I recognize that the CBOR approach would break between model revisions if model authors arbitrarily reordered enums, but since that is already counter to RFC7950 backwards-compatibility guidelines, that is a non-issue.
> 
> So, even with the CBOR intent to use numeric wireline encoding, avoiding the explicit use of the value statement still seems like an overall benefit to the majority of developers.
>

Developers can shoot themself into the food in either way. So how are
we going to declare that one way of shooting yourself into the food it
better than the other?

Here is my reasoning: If developers go and change explicit enum
values, I believe they more likely realize that they break a contract
by doing so. If they just change the order of enum definitions, they
may not realize that they also changed the value associated with an
enum. This is my reasoning.

And yes, RFC 7950 section 11 first bullet clear says that regardless
how you shoot yourself into the food, it will hurt. So we can be
entirely silent about this because RFC 7950 section 11 really nails
it.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>