From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH RFC 2/9] libxl idl: allow implicit enum values Date: Thu, 25 Jun 2015 16:59:02 +0100 Message-ID: <1435247942.32500.101.camel@citrix.com> References: <1435153656-19485-1-git-send-email-rob.hoes@citrix.com> <1435153656-19485-3-git-send-email-rob.hoes@citrix.com> <21898.51169.991017.184003@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z89Yf-00006k-DZ for xen-devel@lists.xenproject.org; Thu, 25 Jun 2015 15:59:21 +0000 In-Reply-To: <21898.51169.991017.184003@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xenproject.org, euan.harris@citrix.com, Rob Hoes List-Id: xen-devel@lists.xenproject.org On Wed, 2015-06-24 at 16:08 +0100, Ian Jackson wrote: > Rob Hoes writes ("[PATCH RFC 2/9] libxl idl: allow implicit enum values"): > > Introducing two special enum values: > > * ENUM_NEXT: equal to the previous value in the enum plus 1 > > * ENUM_PREV: equal to the previous value in the enum minus 1 > > > > This makes it a little easier to maintain enums for which we do not care too > > much about the exact enum values. > > It means that enum values can't be looked up without compiling the > code. It also means that deleting an old enum value would result in > unexpected and undesirable changes to subsequent enums. > > So I'm afraid I don't agree with this approach. Neither do I. An unstable ABI is one thing, having error messages change randomly from "error -3" to "error -4" because someone added a new one is a step too far though I think.