Re: [Json] JSON Schema Language is nearly done: int53

Pete Cordell <petejson@codalogic.com> Tue, 30 July 2019 10:24 UTC

Return-Path: <petejson@codalogic.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C0A3A1203DE for <json@ietfa.amsl.com>; Tue, 30 Jul 2019 03:24:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 7LbeGKyQBlgh for <json@ietfa.amsl.com>; Tue, 30 Jul 2019 03:24:43 -0700 (PDT)
Received: from ppsa-online.com (ppsa-online.com [217.199.162.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 266F21203D5 for <json@ietf.org>; Tue, 30 Jul 2019 03:24:43 -0700 (PDT)
Received: (qmail 5933 invoked from network); 30 Jul 2019 11:22:17 +0100
Received: from host109-149-217-70.range109-149.btcentralplus.com (HELO ?192.168.1.72?) (109.149.217.70) by lvps217-199-162-217.vps.webfusion.co.uk with ESMTPSA (AES128-SHA encrypted, authenticated); 30 Jul 2019 11:22:16 +0100
To: "Manger, James" <James.H.Manger@team.telstra.com>, Ulysse Carion <ulysse@segment.com>
Cc: JSON WG <json@ietf.org>
References: <SY2PR01MB27642C6983E387C397B11581E5DD0@SY2PR01MB2764.ausprd01.prod.outlook.com> <CAJK=1RjhuCYJe4-BSB++8+-dHG3LV8TdqsnFEPAoAkfJ1mOE3A@mail.gmail.com> <SY2PR01MB2764AD4523625006B1F3DFEBE5DC0@SY2PR01MB2764.ausprd01.prod.outlook.com>
From: Pete Cordell <petejson@codalogic.com>
Message-ID: <3812d923-61ea-3a2a-54a3-f3dcf9adeaad@codalogic.com>
Date: Tue, 30 Jul 2019 11:24:38 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <SY2PR01MB2764AD4523625006B1F3DFEBE5DC0@SY2PR01MB2764.ausprd01.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/wCBYa1meuJmrEf4X-g6ggGBkGx0>
Subject: Re: [Json] JSON Schema Language is nearly done: int53
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Tue, 30 Jul 2019 10:24:46 -0000

On 30/07/2019 05:34, Manger, James wrote:
>> Perhaps int53 is a footgun for reasons similar to int64? Folks in 
> practice might pretend int53 is int64 for all intents and purposes, 
> incurring the same problems.
> 
> You have to be fairly wilful to ignore that “int53” isn’t designed for 
> all 64-bit integers.
> 
> And if 1 party ignored that, it is immediately obvious who is “at fault” 
> when interop fails.
> 
> How crucial is it that code-gen can create uint8, int32 fields etc? As 
> JSON is the exchange format you aren’t saving any bytes for 
> transmission. I guess you might save a few bytes in memory. I’m not sure 
> how important that is. If it is, those cases don’t have to use code-gen.

int8 etc let's you know that 8 bits is sufficient. It doesn't mean it 
has to be stored in an 8 bit integer.  But it can be if that helps your 
system.

> Include int8, int16, & int32 and people will want int64 (or extrapolate 
> some implementations to int64).
> 
> Include int53 and they’ll know that’s all they get.

IoT is supposedly still on the increase. Some smaller systems do not 
have float types so the one true int53 type doesn't work there.



Allow the specification to capture the information the designers need to 
build their system and let them work out how to meet the requirements.


Pete.
-- 
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------