From: Ian Jackson Subject: Re: [PATCH v2-resend 07/30] libxl: ocaml: avoid reserved words in type and field names. Date: Tue, 27 Aug 2013 16:01:56 +0100 Message-ID: <21020.48996.681242.760237@mariner.uk.xensource.com> References: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-8-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377168678-25492-8-git-send-email-rob.hoes@citrix.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: Rob Hoes Cc: ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 07/30] libxl: ocaml: avoid reserved words in type and field names."): > Current just s/type/ty/ and there are no such fields (yet) so no > change to generated code. I think this should be done in a systematic way, and one which is an injection[1]. What if someone later introduces a field called "ty" in the same struct as one called "type" ? I don't know what a good convention would be in ocaml, but for example you could prefix everything with "idl_" (including names starting "idl_"). [1] http://en.wikipedia.org/wiki/Injection_%28mathematics%29 Ian.