From: Ian Campbell Subject: Re: [PATCH v3-RESEND 03/28] libxl: ocaml: avoid reserved words in type and field names. Date: Thu, 31 Oct 2013 17:20:58 +0000 Message-ID: <1383240058.5436.16.camel@dagon.hellion.org.uk> References: <1382362365-6645-1-git-send-email-rob.hoes@citrix.com> <1382362365-6645-4-git-send-email-rob.hoes@citrix.com> <1382652256.22417.131.camel@hastur.hellion.org.uk> <8ED3B5B4-88F2-4D2A-9029-199A7C963EEB@citrix.com> <1382684169.22417.142.camel@hastur.hellion.org.uk> <360717C0B01E6345BCBE64B758E22C2D142C2F@AMSPEX01CL03.citrite.net> <21102.33221.916652.925803@mariner.uk.xensource.com> <1383227021.25018.56.camel@dagon.hellion.org.uk> <21106.26807.185968.653728@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21106.26807.185968.653728@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: Rob Hoes , "" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-10-31 at 14:27 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH v3-RESEND 03/28] libxl: ocaml: avoid reserved words in type and field names."): > > On Mon, 2013-10-28 at 15:24 +0000, Ian Jackson wrote: > > > That would be fine by me. I would marginally prefer to simply dump a > > > list of the ocaml keywords into the ocaml idl generator. > > > > http://caml.inria.fr/pub/docs/manual-ocaml-4.01/manual044.html seems to > > have a list, I suppose it is reasonably static across ocaml updates? > > It's not too insane to include it all now. Using most of them in our ABI > > would be a bug in our ABI IMHO > > Right. > > > and/or are already C reserved words (e.g. "else", "false" etc). > > Irrelevant now, but I would be tempted to say that if we would really > want to pick a C reserved word for an IDL item we should do a similar > workaround for C. Ie I don't think C should be special. Sounds reasonable. > But C's set > of reserved words is small enough that it's not very likely. Yes. > And even more irrelevant: this happened to me in a previous life. We > had an IDL-based code generator. One of the fields in one of our > structs was called "export". A few years later, the C++ people > decided to introduce a new keyword, "export". We were quite cross... I can imagine ;-)