[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3-RESEND 03/28] libxl: ocaml: avoid reserved words in type and field names.


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxx>
  • From: Rob Hoes <Rob.Hoes@xxxxxxxxxx>
  • Date: Mon, 4 Nov 2013 14:59:34 +0000
  • Accept-language: en-GB, en-US
  • Cc: "<xen-devel@xxxxxxxxxxxxx>" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 04 Nov 2013 15:00:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHOzmIRezhshjcakE6UWACOcLkKV5oES6oAgAAB/YCAAJKegIAAPgxAgAUX2oCABJq4gIAADB6AgAAwlwCABjGo8A==
  • Thread-topic: [PATCH v3-RESEND 03/28] libxl: ocaml: avoid reserved words in type and field names.

> 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.

Ok, so I'll change the patch to include the list of OCaml keywords, and have 
the munge function add an "xl_" prefix to those and only those names that are 
in the list.

Thanks,
Rob

> >   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 ;-)
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.