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

Andy Bierman <andy@yumaworks.com> Fri, 15 March 2024 17:01 UTC

Return-Path: <andy@yumaworks.com>
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 4A8FFC14F690 for <netmod@ietfa.amsl.com>; Fri, 15 Mar 2024 10:01:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.105
X-Spam-Level:
X-Spam-Status: No, score=-7.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
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 njLTya4swHVD for <netmod@ietfa.amsl.com>; Fri, 15 Mar 2024 10:01:05 -0700 (PDT)
Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6E76FC14F68B for <netmod@ietf.org>; Fri, 15 Mar 2024 10:01:05 -0700 (PDT)
Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-29b7164eef6so1838971a91.2 for <netmod@ietf.org>; Fri, 15 Mar 2024 10:01:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1710522064; x=1711126864; darn=ietf.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=31v2B8IQdN+Xru2fI8UZyr8Q7eUEOSz5jnkB7Rvo8zo=; b=s2FyzG8WJuUcw/S2WDGzcxA4Z9V3AsitPdDWXvHHacnRMK8lwsLBoWLt0pdXMfrwRY JSbkKR6p/qigqUTWWkOJZpXaFvC5QbWWpxmt1CLi+lGNGg+oRGefDyJyxsMCUvNvHTPk +EEgPLBvYYPx3oDFWTapRhmok+MtKW2y+1qvnYIoD7HTyYUpGilWb3gTs4KVGGQYdIQe 6yIGso5UMdAzWPyxcFSR6DKKm+s5WdSiEEFEqRWqGKG+FY7Ik0bi347ZG48so0gCnPH3 c7VwKt/hDgRQEXLG+WfOpMIG4XAcLiiZXXMjunKcCeAIcvr2PY5pEZqVF5T5RPfMy/xP YoVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710522064; x=1711126864; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=31v2B8IQdN+Xru2fI8UZyr8Q7eUEOSz5jnkB7Rvo8zo=; b=LD0nazUmGZ349sNfLv+DV8ltRSDKQE1nYcwHzDpo5vkshHNbtBIDYDvj+R9ZNSXd3q Y6vjLeP656xSb0cxjIfkl4cXXB88aBjIz+Vnk0747LS35NWN4x9zzJ9VLfML8Z/h0k4P CSy+nVii6/T/wBHeZSHt2ehLnqZJ9H3ez4hDHhC/OmxmKDhJNgAZZhvMHrczqXlZg48N hIRKhYgSXt+MvWmPlh6X2JXumX5XsAB0XInmI0fsFdU3kr4u3/LiWLmEnD0ucOIKlLU2 xYj7Xh+dEMUWinM4wv6l47cT98xBUIYssGIuYDEJnEOP82RkHomijFy9eUU9rMNfeX4F 5DTg==
X-Forwarded-Encrypted: i=1; AJvYcCUs8pxAscglSSUiEQN72W7rrAMaQYd85FW/EIbYMDby4UCyJnW+/aqhrk8VQx0jgd6840VFQdyxqVFPWGmHy8A=
X-Gm-Message-State: AOJu0Yy/h74Z1B4SwrnfxknqhTYJGjGw5+SEWiSVYPkL6sBS3aiP06Cs qKWPz9+H3sACWKrcuR9kFCpPExjk9FD9bFk2BIjGYkrsp/ILvfxYP99HeqKr8hI7lEoNZzhL138 a4gZgu2+EuHp4j9Mz4ZpEIFKDaV3Vu6kVt05lCA==
X-Google-Smtp-Source: AGHT+IEHUPQC09sse8YQJmMp0bCI/qFx/Zxyep5rs4v+ILNF/SCXiHg5AhJ4OabfoG3cBBs97y9Ax4kk9jJPsr9pv84=
X-Received: by 2002:a17:90b:617:b0:29b:fa9f:af9f with SMTP id gb23-20020a17090b061700b0029bfa9faf9fmr5259184pjb.18.1710522064441; Fri, 15 Mar 2024 10:01:04 -0700 (PDT)
MIME-Version: 1.0
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> <ZfR6e-KRQHrtFsLb@alice.eecs.jacobs-university.de>
In-Reply-To: <ZfR6e-KRQHrtFsLb@alice.eecs.jacobs-university.de>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 15 Mar 2024 10:00:53 -0700
Message-ID: <CABCOCHSs_LshD4_XzE+YWjk3WK0zcwPbcwi2TF13c7iOZ7cTQQ@mail.gmail.com>
To: Jürgen Schönwälder <jschoenwaelder@constructor.university>, Andy Bierman <andy@yumaworks.com>, mohamed.boucadair@orange.com, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000836aa0613b5f4b2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ZLqgdOE5BNxvO-0y3UBfJxzGDI4>
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 17:01:10 -0000

On Fri, Mar 15, 2024 at 9:42 AM Jürgen Schönwälder
<jschoenwaelder@constructor.university> wrote:

> 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.
>
>
Short is OK if the prefix is familiar to the reader. Like "if".
What if the writer wanted a, b, c, d, etc? Shortt but not meaningful.
It is a judgment call every time, too complex for a guideline.

The guideline only mentions short so the prefix will not conflict and
the import-stmt in
other modules will not need a different prefix.  This is only for reader
familiarity, since the
YANG compiler does not care which prefix is used.

The naming convention already established is that the SDO prefix (ietf or
iana) is not used.
It would not help readers to change it now.



/js
>

Andy


>
> 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
>