Re: [Json] Doofus Parameter Labels

Phillip Hallam-Baker <> Mon, 30 March 2015 22:35 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 71D4A1A6F29 for <>; Mon, 30 Mar 2015 15:35:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 0.122
X-Spam-Status: No, score=0.122 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Lc0dliiXLF43 for <>; Mon, 30 Mar 2015 15:35:49 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 48FE51A6F28 for <>; Mon, 30 Mar 2015 15:35:49 -0700 (PDT)
Received: by lbdc10 with SMTP id c10so51290491lbd.2 for <>; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=PKFEr5EcGt0xhMoNHVG12ecqjrdM7hPcofATcXQ86Lc=; b=uv/nBmpJVqFlouTEisupFEvQHuWlbcS5LHfC90qCsApkQaXysXP7H3APMIwEvcSFEk YQlgEnsRYxMFwb7ijqbFxnU14Gy8Ndzz58OlQluP1g6HgL7u1BmFwfSrWrFNit+noUwV dmVNZlxZfHce5+PCh8teKJEePYVM3ktps/EtqmC/nsub14G4WJhT8BKsOFFQGfKrthu3 e3DF3D5SvfrjCBoYYvU0QBeXJNP+saIekOMxVe8+gwo9Y4s3WbzudVAk10ORU0vh43uF 59ei9m2dk2bqN1aQlpGlOzGRQUghuzXoUGvbo3VI4Us5ToON/qkTxBTPkoSthVeMsxCr NOUQ==
MIME-Version: 1.0
X-Received: by with SMTP id xq2mr28451807lbb.103.1427754947782; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
Received: by with HTTP; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
In-Reply-To: <>
References: <> <>
Date: Mon, 30 Mar 2015 18:35:47 -0400
X-Google-Sender-Auth: QIxDwELiex2XmW4hwNFcCJ7QuPY
Message-ID: <>
From: Phillip Hallam-Baker <>
To: Wendy Roome <>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <>
Cc: JSON WG <>
Subject: Re: [Json] Doofus Parameter Labels
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 30 Mar 2015 22:35:50 -0000

On Mon, Mar 30, 2015 at 4:04 PM, Wendy Roome <> wrote:
> It would help if you told us which draft and which code generator you are
> using.

The draft is water under the bridge at this point. The code generator
is ProtoGen.

> My first reaction is that if the code generator is supposed to generate
> real code that you can feed directly into a compiler, then the code
> generator should ensure that it generates legal code. Eg, if it maps a
> protocol field into a variable, the code gen should transmogrify the
> protocol field name into a valid variable name.

The issue is not the difficulty of transmogrification in the
generator, it is remembering what the transmogrification is in my

Programming is a process of getting ideas into electronic form. The
more unnecessary hoops people have to jump through, the greater the
probability of error.

> Simplest solution is to
> slap a fixed prefix, like m_, onto every generated variable, and replace
> non-alpha-num chars with _.
> My second reaction is why canĀ¹t you do that yourself?

The problem comes when you are using two code generators that have
different ways of coping with the problem.

The choice of labels is arbitrary. Why make choices that introduce
unnecessary complexity?