Re: [Json] Doofus Parameter Labels
Phillip Hallam-Baker <phill@hallambaker.com> Mon, 30 March 2015 22:35 UTC
Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 71D4A1A6F29 for <json@ietfa.amsl.com>; Mon, 30 Mar 2015 15:35:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.122
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lc0dliiXLF43 for <json@ietfa.amsl.com>; Mon, 30 Mar 2015 15:35:49 -0700 (PDT)
Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 48FE51A6F28 for <json@ietf.org>; Mon, 30 Mar 2015 15:35:49 -0700 (PDT)
Received: by lbdc10 with SMTP id c10so51290491lbd.2 for <json@ietf.org>; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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 10.112.161.66 with SMTP id xq2mr28451807lbb.103.1427754947782; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.112.147.165 with HTTP; Mon, 30 Mar 2015 15:35:47 -0700 (PDT)
In-Reply-To: <D13F2226.1F3612%w.roome@alcatel-lucent.com>
References: <CAMm+Lwg7UBJO83BN1xBbVsbzgeXa1pbhtiTcPKmMgFX3HcvQEw@mail.gmail.com> <D13F2226.1F3612%w.roome@alcatel-lucent.com>
Date: Mon, 30 Mar 2015 18:35:47 -0400
X-Google-Sender-Auth: QIxDwELiex2XmW4hwNFcCJ7QuPY
Message-ID: <CAMm+Lwgc28iiQRnKZbsVocZLRwBzQAP3+5L=kwsiBxmgK7=1sQ@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: Wendy Roome <w.roome@alcatel-lucent.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/ooUy6DhAb5nYvd-LpmZlTyp3oI0>
Cc: JSON WG <json@ietf.org>
Subject: Re: [Json] Doofus Parameter Labels
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Mar 2015 22:35:50 -0000
On Mon, Mar 30, 2015 at 4:04 PM, Wendy Roome <w.roome@alcatel-lucent.com> 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 head. 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?
- [Json] Doofus Parameter Labels Phillip Hallam-Baker
- Re: [Json] Doofus Parameter Labels Wendy Roome
- Re: [Json] Doofus Parameter Labels Nico Williams
- Re: [Json] Doofus Parameter Labels Phillip Hallam-Baker
- Re: [Json] Doofus Parameter Labels Nico Williams