Re: [yang-doctors] guideline for enum and value?
"Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com> Wed, 14 February 2018 19:46 UTC
Return-Path: <einarnn@cisco.com>
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 4B58C124205 for <yang-doctors@ietfa.amsl.com>; Wed, 14 Feb 2018 11:46:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.53
X-Spam-Level:
X-Spam-Status: No, score=-14.53 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 M7P3wPpd7E3K for <yang-doctors@ietfa.amsl.com>; Wed, 14 Feb 2018 11:46:11 -0800 (PST)
Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C19512D7F4 for <yang-doctors@ietf.org>; Wed, 14 Feb 2018 11:46:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=6251; q=dns/txt; s=iport; t=1518637571; x=1519847171; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=RNcxQe9eJl8SEBgFzDkasRG71C+EWHYdeRsoZC/tPHE=; b=Yra12WZUltter3mA+ZU+9tb1Y2DUH4VRRbDFmbsjArcGY/bGjUIKcS0q VpMgUFb/2+x7IcuuC+lLJqkI7i7W3nfuZA5XeArW1t47e/iDHRZtjjuKN ambkwL7HMaN/4NRpPI9ISDtHwBtYmbr6sFv+0fCZphIaTLzf5aJt1K4pF Y=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0D/AAAGkYRa/4oNJK1dGQEBAQEBAQEBAQEBAQcBAQEBAYNSgVYoCo1/jgSCAoEXkGeFW4IYCoU7AoJ9VBgBAgEBAQEBAQJrKIUkBnkQAgEIDgIvBzIUEQIEDgWJUWSyEIkBghMBAQEBAQEBAQEBAQEBAQEBAQEBAQEdhQKCFYM/KYMFhViDEoIUIAWkLwkCjCaJXQ6SWYFelEyDIAIRGQGBOwEfOYFQcBVnAYIbP4Q4eIxpgRkBAQE
X-IronPort-AV: E=Sophos;i="5.46,513,1511827200"; d="scan'208,217";a="354240532"
Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 19:46:10 +0000
Received: from XCH-RTP-009.cisco.com (xch-rtp-009.cisco.com [64.101.220.149]) by alln-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id w1EJkARN017757 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 14 Feb 2018 19:46:10 GMT
Received: from xch-rtp-009.cisco.com (64.101.220.149) by XCH-RTP-009.cisco.com (64.101.220.149) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 14 Feb 2018 14:46:09 -0500
Received: from xch-rtp-009.cisco.com ([64.101.220.149]) by XCH-RTP-009.cisco.com ([64.101.220.149]) with mapi id 15.00.1320.000; Wed, 14 Feb 2018 14:46:08 -0500
From: "Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "Benoit Claise (bclaise)" <bclaise@cisco.com>, Martin Bjorklund <mbj@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Thread-Topic: [yang-doctors] guideline for enum and value?
Thread-Index: AQHTlcbpF55YB2P00UGkbIeEUIJY9qOEwc4AgB+2owCAAAYcAIAAA2eAgAAFmwCAAAkHgIAAHqAAgAADAACAAA74AA==
Date: Wed, 14 Feb 2018 19:46:08 +0000
Message-ID: <EC01719F-6C81-49FD-A996-720B1C353630@cisco.com>
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> <20180214185234.mfek2udzgyqoq3lq@elstar.local>
In-Reply-To: <20180214185234.mfek2udzgyqoq3lq@elstar.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3445.5.20)
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.61.193.2]
Content-Type: multipart/alternative; boundary="_000_EC01719F6C8149FDA996720B1C353630ciscocom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/a8089zCDjPnV6UZy_N7wXf9qCHk>
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 19:46:13 -0000
On Feb 14, 2018, at 6:52 PM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote: 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? Practical experience is one thing. I have had to deal very directly with this issue in embedded OS development in my day job, and I can say that had developers not used the value statement, things would have been easier. And so when it comes to the teams I work with, we have put this recommendation in place already, and that advice will not change irrespective of what this thread may, or may not, recommend. And I'm fine with that! :-) 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. You're making assumptions in this about the organizational structure and responsibilities of teams and the toolchains used that don't hold true everywhere when you say this, which is fine; it's also what I'm doing when I say that your reasoning above wouldn't have helped my scenario :-) 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. Fine, that works. Cheers, Einar
- [yang-doctors] guideline for enum and value? Benoit Claise
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Martin Bjorklund
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Benoit Claise
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Acee Lindem (acee)
- Re: [yang-doctors] guideline for enum and value? Martin Bjorklund
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Martin Bjorklund
- Re: [yang-doctors] guideline for enum and value? Christian Hopps
- Re: [yang-doctors] guideline for enum and value? Benoit Claise
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Einar Nilsen-Nygaard (einarnn)
- Re: [yang-doctors] guideline for enum and value? Jan Lindblad
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Acee Lindem (acee)
- Re: [yang-doctors] guideline for enum and value? Andy Bierman
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Einar Nilsen-Nygaard (einarnn)
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder
- Re: [yang-doctors] guideline for enum and value? Einar Nilsen-Nygaard (einarnn)
- Re: [yang-doctors] guideline for enum and value? Juergen Schoenwaelder