Re: [YANG] so many naming scopes

Andy Bierman <ietf@andybierman.com> Wed, 09 January 2008 23:04 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 1JCjyb-0003vR-9w; Wed, 09 Jan 2008 18:04:49 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JCjya-0003uw-Ad for yang-confirm+ok@megatron.ietf.org; Wed, 09 Jan 2008 18:04:48 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JCjya-0003uo-0s for yang@ietf.org; Wed, 09 Jan 2008 18:04:48 -0500
Received: from smtp123.sbc.mail.sp1.yahoo.com ([69.147.64.96]) by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JCjyZ-0003yf-KQ for yang@ietf.org; Wed, 09 Jan 2008 18:04:48 -0500
Received: (qmail 36295 invoked from network); 9 Jan 2008 23:04:46 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.84.5 with plain) by smtp123.sbc.mail.sp1.yahoo.com with SMTP; 9 Jan 2008 23:04:46 -0000
X-YMail-OSG: LQUmBGcVM1kohn8eDOB0.ZdaBylPAi9zmRUbD79Zez47vA6A
Message-ID: <4785530E.3080007@andybierman.com>
Date: Wed, 09 Jan 2008 15:04:46 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Andy Bierman <ietf@andybierman.com>, "tom.petch" <cfinss@dial.pipex.com>, yang@ietf.org
Subject: Re: [YANG] so many naming scopes
References: <200801082230.m08MUP3O095222@idle.juniper.net> <012701c852d5$ff6ffc60$0601a8c0@pc6> <4784FD0D.6020103@andybierman.com> <20080109224627.GE5390@elstar.local>
In-Reply-To: <20080109224627.GE5390@elstar.local>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: cab78e1e39c4b328567edb48482b6a69
Cc:
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

Juergen Schoenwaelder wrote:
> On Wed, Jan 09, 2008 at 08:57:49AM -0800, Andy Bierman wrote:
> 
>> Now you bring up a new twist:
>>
>>    typedef typedef {
>>      type string;
>>    }
>>
>>    leaf leaf {
>>      type typedef;
>>    }
>>
>> IMO, there needs to be guidelines (in the form of SHOULD NOT text)
>> that says not to use YANG keywords for identifiers and not
>> to use the same values for typedefs, groupings, and object names,
>> even though it is allowed.
> 
> Usage guidelines and "coding styles" are valuable. But they should not
> be part of the language itself. The example above is not ambiguous and
> easy to parse for a machine - even though it might look stupid to most
> humans.
> 
> I do remember the fun I had when C++ came along with the 'new'
> keyword. The namespaces we have in YANG help to avoid such problems so
> that we can add keywords to YANG without risking to break something.
> 

Except that YANG has embedded coding style text already,
such as the sentence about SHOULD NOT differ only in case.
Names such as foo and Foo and perfectly valid.  There is
no reason whatsoever to have this text, same as a CLR
about not having grouping foo and typedef foo, other than
to enforce a coding style.  (My suggestion was SHOULD, not MUST.)

Standards are full of non-binding text (SHOULD, MAY) because
it can encourage interoperability.  Some people think
multi-vendor interoperability is more important for a
standard than single-vendor flexibility.


> /js
> 

Andy


_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang