Re: [netmod] On prefixes again RE: IETF#119 I-D Status: draft-ietf-netmod-rfc8407bis

Jürgen Schönwälder <jschoenwaelder@constructor.university> Fri, 15 March 2024 16:42 UTC

Return-Path: <jschoenwaelder@constructor.university>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 465A6C14F616 for <netmod@ietfa.amsl.com>; Fri, 15 Mar 2024 09:42:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.243
X-Spam-Level:
X-Spam-Status: No, score=-1.243 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tOCJiHOwldPd for <netmod@ietfa.amsl.com>; Fri, 15 Mar 2024 09:42:42 -0700 (PDT)
Received: from beadg.de (beadg.de [178.254.54.206]) by ietfa.amsl.com (Postfix) with ESMTP id 378A4C14F68B for <netmod@ietf.org>; Fri, 15 Mar 2024 09:42:39 -0700 (PDT)
Received: from localhost (unknown [212.201.44.249]) by beadg.de (Postfix) with ESMTPSA id 11DB516A044; Fri, 15 Mar 2024 17:42:38 +0100 (CET)
Date: Fri, 15 Mar 2024 17:42:35 +0100
From: Jürgen Schönwälder <jschoenwaelder@constructor.university>
To: Andy Bierman <andy@yumaworks.com>
Cc: mohamed.boucadair@orange.com, "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <ZfR6e-KRQHrtFsLb@alice.eecs.jacobs-university.de>
Reply-To: Jürgen Schönwälder <jschoenwaelder@constructor.university>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, mohamed.boucadair@orange.com, "netmod@ietf.org" <netmod@ietf.org>
References: <DU2PR02MB1016026565C00BFB81BB1367D882B2@DU2PR02MB10160.eurprd02.prod.outlook.com> <7CEA678E-9EEA-425E-B670-165582B4FD9A@gmail.com> <CABCOCHR1m1CDnEqjDhcgxnz433vs7SbQtjqG+KnkSwAuCJJE1w@mail.gmail.com> <DU2PR02MB10160B406F85CDE1669334FBD88282@DU2PR02MB10160.eurprd02.prod.outlook.com> <ZfRZ-acsHG7a_Kbf@alice.eecs.jacobs-university.de> <CABCOCHSmhVuW0WBt5xggCfcOOF3Vr-KDcbFo3W=9GwOzY5zYvQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CABCOCHSmhVuW0WBt5xggCfcOOF3Vr-KDcbFo3W=9GwOzY5zYvQ@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9dMVI-HP1iKZRQtCStRpLmZe_Yk>
Subject: Re: [netmod] On prefixes again RE: IETF#119 I-D Status: draft-ietf-netmod-rfc8407bis
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Mar 2024 16:42:44 -0000

Yes, for long XPath expressions, one likes to have short prefixes, the
shorter the better. In other contexts, such as type definitions, one
may want to use longer prefixes providing more context. It seems you
can't have both at the same time. Given this inherent conflict, I am
not sure that generally pushing for longer prefixes is a good thing.

For modules with long XPath expressions, an author may consider to go
for one character local prefixes even if they require to lookup their
meaning in the imports (or people have modern editors that can
dynamically show an expansion) because mutli-line XPath expressions
with lots of repetitive substrings are pretty bad for human eyes.

/js

On Fri, Mar 15, 2024 at 08:22:03AM -0700, Andy Bierman wrote:
> On Fri, Mar 15, 2024 at 7:24 AM Jürgen Schönwälder
> <jschoenwaelder@constructor.university> wrote:
> 
> > I wonder which problem we are solving with adding more little rules.
> > Perhaps a future version of YANG will do away with prefixes but until
> > this happens, I do not think we need to add more rules about how to
> > choose prefixes. The original intend was that they are short to keep
> > YANG snippets concise and easy to read.
> >
> >
> 
> This is the IETF Coding Conventions document, not the YANG specification.
> Naming conventions are CLRs but often with some benefits.
> 
> What problems?
> 
> 1) If there are multiple modules used in imports then the reader must be
> able to
> easily tell the prefixes apart.  If prefixes are too short and not
> meaningful, this task
> gets more difficult.  I find myself constantly going back to the imports to
> make sure
> I am matching the prefix to the correct module.
> 
> 2) If there are complex XPath expressions then prefixes that are too long
> make the
> expression unreadable, especially as it is chopped into "string" +
> "string"  format
> to fit into 72 character lines. If prefixes are too short then back to
> problem (1).
> 
> 3)  It is becoming more common to have vendor modules import modules from
> multiple SDOs.
> Prefix naming conventions are already the BCP everywhere but the IETF.
> 
> Is it too late to start for IETF? There are many modules already with no
> naming consistency,
> so this would only affect new modules. There will never be consistent
> naming of prefixes
> so it may not be worth the change now.
> 
> 
> 
> /js
> >
> 
> 

-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany