Re: [YANG] so many naming scopes
Andy Bierman <ietf@andybierman.com> Fri, 04 January 2008 12:46 UTC
Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
by megatron.ietf.org with esmtp (Exim 4.43)
id 1JAlwb-0002Uk-AN; Fri, 04 Jan 2008 07:46:37 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JAlwa-0002UP-6b
for yang-confirm+ok@megatron.ietf.org; Fri, 04 Jan 2008 07:46:36 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JAlwZ-0002UH-TB
for yang@ietf.org; Fri, 04 Jan 2008 07:46:35 -0500
Received: from smtp110.sbc.mail.mud.yahoo.com ([68.142.198.209])
by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JAlwZ-0001U0-Aj
for yang@ietf.org; Fri, 04 Jan 2008 07:46:35 -0500
Received: (qmail 29381 invoked from network); 4 Jan 2008 12:46:34 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.80.25
with plain)
by smtp110.sbc.mail.mud.yahoo.com with SMTP; 4 Jan 2008 12:46:34 -0000
X-YMail-OSG: xnuoaQgVM1kWUtdijJLUUJ29fMYlz.NZjuZksqy8yMDZ8_ya8wrsvVYHlSrf5PS37eDxC_ylfRSQhuqeNYAiNBxtOQ--
Message-ID: <477E2AA9.7080003@andybierman.com>
Date: Fri, 04 Jan 2008 04:46:33 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Bert Wijnen - IETF <bertietf@bwijnen.net>
Subject: Re: [YANG] so many naming scopes
References: <NIEJLKBACMDODCGLGOCNKEKPEEAA.bertietf@bwijnen.net>
In-Reply-To: <NIEJLKBACMDODCGLGOCNKEKPEEAA.bertietf@bwijnen.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 10ba05e7e8a9aa6adb025f426bef3a30
Cc: yang@ietf.org
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org
Bert Wijnen - IETF wrote:
>> Balazs Lengyel wrote:
>>> While the use of many naming-scopes is understandable for the compiler
>>> is it easy to understand for the reader ? IMHO no.
> To which Andy responded:
>
>> That is my concern as well.
>>
>> As in any engineering decision, we have to weigh the trade-offs.
>> How much overall value is lost by forcing DM writers to
>> maintain one set of identifiers (using up some of the 63 chars
>> of minimum uniqueness), vs. the confusion of having the same
>> identifier value mean many different things, even within the same file.
>>
>
> If the language can accept and easily handle it, then maybe we should
> allow it to do so and not create CLRs.
> A good and smart data-model-developer would/should still do the right
> thing and make things as clear as possible for the user/reader of the
> data-model. That means that one uses a style of definitions that is
> obvious and clear and so would not cause confusion.
>
> It is similar to using all sorts of short abbreviations/acronyms in names
> of variables and such versus spelling out a longer name. The longer name
> will make it much more readable/understandable for the new person who
> read the module for the first time. That does not mean we must pre-scribe
> that short-names/acronyms are not allowed.
>
>>> I like Andy's proposal.
>
> So I like the underlying reasons, but I am not sure we have to enforce it
> in the langauge.
<implementor-hat-on>
I don't mind your suggestion at all, since I already coded it
the way it's defined now. It is not much more work to keep
typedefs, groupings, and objects (data/rpc/notification) separate.
</implementor-hat-on>
There is a sentence in sec. 6.2 about SHOULD not have names that are different
just in case. There could be another sentence that says all identifiers
(of these 3 types) SHOULD be unique. IMO, standard data models
do not need to overload these identifiers. There are 63 chars,
instead of 32 in SMI, and (for data) it is only sibling nodes, not every node.
>
> Bert
Andy
>>> Balazs
>> Andy
>>
>>
>>> Phil Shafer wrote:
>>>> Andy Bierman writes:
>>>>> Yes, of course one naming scope (the term namespace is taken)
>>>>> amongst siblings, except nested typedef and grouping names
>>>>> cannot mask similar definitions within an ancestor node,
>>>>> or globally within the same module. (This part already in the draft.)
>>>> Isn't this dancing on the line of CLR? Where's the logic of saying
>>>> "don't do that" when there's really no ambiguity? If I say "leaf foo
>>>> { .. } typedef foo { .. }", my use of "type foo" is clear.
>>>> Is there a situation where isn't not clear to the compiler
>>>> what is meant? Are we trying to get the compiler to enforce
>>>> style rules when the language proper doesn't require them?
>>>>
>>>> Thanks,
>>>> Phil
>>>>
>>>>
>>>> _______________________________________________
>>>> YANG mailing list
>>>> YANG@ietf.org
>>>> https://www1.ietf.org/mailman/listinfo/yang
>>
>>
>> _______________________________________________
>> YANG mailing list
>> YANG@ietf.org
>> https://www1.ietf.org/mailman/listinfo/yang
>>
>
>
>
_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang
- [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes Martin Bjorklund
- Re: [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes Phil Shafer
- Re: [YANG] so many naming scopes Martin Bjorklund
- Re: [YANG] so many naming scopes Balazs Lengyel
- Re: [YANG] so many naming scopes Andy Bierman
- RE: [YANG] so many naming scopes Bert Wijnen - IETF
- Re: [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes Juergen Schoenwaelder
- Re: [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes tom.petch
- Re: [YANG] so many naming scopes Phil Shafer
- Re: [YANG] so many naming scopes tom.petch
- Re: [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes Phil Shafer
- Re: [YANG] so many naming scopes Juergen Schoenwaelder
- Re: [YANG] so many naming scopes Andy Bierman
- Re: [YANG] so many naming scopes Juergen Schoenwaelder
- Re: [YANG] so many naming scopes Phil Shafer
- Re: [YANG] so many naming scopes Balazs Lengyel
- Re: [YANG] so many naming scopes Juergen Schoenwaelder
- RE: [YANG] so many naming scopes Bert Wijnen - IETF