Re: [babel] [netmod] NULL value for uint16

Carsten Bormann <cabo@tzi.org> Tue, 14 September 2021 18:36 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 64BE63A286A; Tue, 14 Sep 2021 11:36:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 qJTBfRHfb9LD; Tue, 14 Sep 2021 11:36:17 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F364A3A2868; Tue, 14 Sep 2021 11:36:16 -0700 (PDT)
Received: from smtpclient.apple (p548dcf6e.dip0.t-ipconnect.de [84.141.207.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4H8BrF3yJMz2xKt; Tue, 14 Sep 2021 20:36:13 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20210914171729.ph5q77zm46z3zvxi@anna.jacobs.jacobs-university.de>
Date: Tue, 14 Sep 2021 20:36:12 +0200
Cc: "STARK, BARBARA H" <bs7652@att.com>, Babel at IETF <babel@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FAE5986C-BE56-44A9-A6A5-1A37D9539F61@tzi.org>
References: <AM7PR07MB624802516EFB174B6912C5DAA0D69@AM7PR07MB6248.eurprd07.prod.outlook.com> <20210910121430.kofyvd2q3ludm2pk@anna.jacobs.jacobs-university.de> <AM7PR07MB62482A4271AF1CA5013EB136A0D69@AM7PR07MB6248.eurprd07.prod.outlook.com> <b1b1cd18-537f-561f-dcb1-9aca41b7d3c9@labn.net> <20210910200902.bic4rhyhp75bgsjz@anna.jacobs.jacobs-university.de> <BBC6AA9F-86C1-4A9C-86FD-AD77668CA9D9@gmail.com> <20210913200455.xot7lihpmqiemm5c@anna.jacobs.jacobs-university.de> <DM6PR02MB69248D2780D5C880CC647783C3D99@DM6PR02MB6924.namprd02.prod.outlook.com> <AM7PR07MB6248BBB558136D1E6F8C1549A0DA9@AM7PR07MB6248.eurprd07.prod.outlook.com> <DM6PR02MB692446F49506791E90B0D23EC3DA9@DM6PR02MB6924.namprd02.prod.outlook.com> <20210914171729.ph5q77zm46z3zvxi@anna.jacobs.jacobs-university.de>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/REEX-u13AQ8xXFsv6hG0LktKZ6k>
Subject: Re: [babel] [netmod] NULL value for uint16
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Sep 2021 18:36:23 -0000

On 14. Sep 2021, at 19:17, Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> If other data models use an extended integer range and -1 to indicate
> a special case, then this may be a strong reason to do the same in the
> IETF YANG data model.

Any data model based on FORTRAN certainly will do.
Most other data modeling languages by now should have nullable/optional/Maybe types.

Going from the actual data type, uint16, to int32, just to accommodate the “not present” case, strikes me as a mistake.
(Which doesn’t mean that you may not want to do this in an implementation, after having validated the input data.)

Grüße, Carsten