Re: [YANG] so many naming scopes

Andy Bierman <ietf@andybierman.com> Fri, 04 January 2008 12:01 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 1JAlFA-0007YK-V9; Fri, 04 Jan 2008 07:01:44 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JAlF9-0007Y7-TE for yang-confirm+ok@megatron.ietf.org; Fri, 04 Jan 2008 07:01:43 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JAlF9-0007Xx-IX for yang@ietf.org; Fri, 04 Jan 2008 07:01:43 -0500
Received: from smtp109.sbc.mail.mud.yahoo.com ([68.142.198.208]) by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JAlF9-0003KU-3Z for yang@ietf.org; Fri, 04 Jan 2008 07:01:43 -0500
Received: (qmail 81814 invoked from network); 4 Jan 2008 12:01:42 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.80.25 with plain) by smtp109.sbc.mail.mud.yahoo.com with SMTP; 4 Jan 2008 12:01:41 -0000
X-YMail-OSG: vykQVsQVM1mBzUwDJy9nQomds3MsJxtV6fOOV5CWanlyPUzpQzjdru.6pd6le4fj5seEsQm9o9iEqNF9lWMyhQVM3g--
Message-ID: <477E2025.7020308@andybierman.com>
Date: Fri, 04 Jan 2008 04:01:41 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: [YANG] so many naming scopes
References: <200801040435.m044ZkPE068099@idle.juniper.net> <477E0175.7010500@ericsson.com>
In-Reply-To: <477E0175.7010500@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 21c69d3cfc2dd19218717dbe1d974352
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

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.

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.


> I like Andy's proposal.
> 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