Re: [Cbor] A CBOR tag for alternatives/unions, request for comments

Michael Richardson <mcr+ietf@sandelman.ca> Thu, 24 February 2022 14:27 UTC

Return-Path: <mcr+ietf@sandelman.ca>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C4EED3A033F for <cbor@ietfa.amsl.com>; Thu, 24 Feb 2022 06:27:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.099
X-Spam-Level:
X-Spam-Status: No, score=-7.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=sandelman.ca
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 xWJheIUgdXWF for <cbor@ietfa.amsl.com>; Thu, 24 Feb 2022 06:27:42 -0800 (PST)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [IPv6:2607:f0b0:f:3:216:3eff:fe7c:d1f3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C3FE93A067A for <cbor@ietf.org>; Thu, 24 Feb 2022 06:27:16 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id EA44F392C0; Thu, 24 Feb 2022 09:35:51 -0500 (EST)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id InHDi5Lty2DE; Thu, 24 Feb 2022 09:35:50 -0500 (EST)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 52E85392BF; Thu, 24 Feb 2022 09:35:50 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1645713350; bh=BpYctRfzSVfeIrNMCuhXhtjH7+utpnqxRsOKrSzsi2U=; h=From:To:cc:Subject:In-Reply-To:References:Date:From; b=KTs9SMIXPU3AOZ6JZLZpzrc3qJINmGZdpVDhRxrIwmxiiSco0XpKxRYBLwI4L7gHB tp/U37OFF1Y4dZcGJfhHBP7CFQzelO1L8mQp8MdTeMSGSBPofKm/TzHjP3DWUzHhdk TdYstmnCe4T73BzYP0UTaeoamWMH55cCYsHdqHsVvrME40IS3FwojF/S7TMbEu0I9f ONwh6owqMTe18+Iikme5KfelC1KbooK2bkHR6SRX8nH26+K5a95tzajrD08jyKxksb A90YLUOY3i1seDX41kxZ9eestEZlYmsmws+y6Xv7RZpNjyBNweGYKXUoAN8HhIb8TQ EzXHyPfRMgkdw==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 9561765; Thu, 24 Feb 2022 09:27:12 -0500 (EST)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Christian =?iso-8859-1?Q?Ams=FCss?= <christian@amsuess.com>, cbor@ietf.org
cc: Carsten Bormann <cabo@tzi.org>, Duncan Coutts <duncan@well-typed.com>, Michael Peyton Jones <michael.peyton-jones@iohk.io>, Jared Corduan <jared.corduan@iohk.io>, Alexander Byaly <alexander.byaly@iohk.io>
In-Reply-To: <Yhd3/bwVUOLJLzWu@hephaistos.amsuess.com>
References: <CAKoRMYH3MTMi_tX5KHF-O-DTKzopiGqe3fi6XjkPaGCM4823OQ@mail.gmail.com> <7dfd62ccb6c089af90c90f26a8945f23232ecbc1.camel@well-typed.com> <CAKoRMYEOo1Gqfc4W4k3NOLKpFa97Q9YzLCm3r0PJ13V2HJPf3A@mail.gmail.com> <2BBF6463-FDB2-4A8A-B20D-7A1AD976A90D@tzi.org> <CAKoRMYFi8uo2GfHA9s1n+-rMO8Ja9=2qMMzjS9Z=F9r3LFozRQ@mail.gmail.com> <8EA89504-C176-4850-9BB8-C7E7206374FF@tzi.org> <CAKoRMYGmOa0hzEFsJh8kpz0bU5x56Yc9P=DBK-ghU83gXxPv7A@mail.gmail.com> <CAKoRMYGUvmxufQUVyvX2mciq5LCmV0Nz-uE2MJn54GDBB+9DRw@mail.gmail.com> <CAKoRMYF_19V6mu4S9GVqfiNzyQVvvOzX6eYwHp_DtZQoG0xTKg@mail.gmail.com> <4B47F4D7-ADE3-4A22-8A5B-97F4E5FCD933@tzi.org> <Yhd3/bwVUOLJLzWu@hephaistos.amsuess.com>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Thu, 24 Feb 2022 09:27:12 -0500
Message-ID: <10956.1645712832@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/ikqFbL_4k2eYVCndWleN_1fQNjY>
Subject: Re: [Cbor] A CBOR tag for alternatives/unions, request for comments
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Feb 2022 14:27:49 -0000

Christian Amsüss <christian@amsuess.com> wrote:
    > Does it, for the applications expecting to use this, make a noticable
    > difference whether a 1+1 or a 1+2 tag is used?

...

    > If not, I'd suggest that, say, 128 tags could be requested from 1+2,
    > leaving the 1+1+1+(2..) version for the unbounded range.

I would also ask this question.

Carsten Bormann <cabo@tzi.org> wrote:
    >> […] this is not a case coming from the constrained or high-volume
    >> applications that CBOR was designed for, […]

    > I’m not so sure about the constrained space: Rust has a strong ascent
    > as the language of choice in the constrained space.  Rust also has a
    > strong enum system.

    > (Rust is also of interest in the high-volume space.)

As a Rustacian, I'm not sure it matters 1+1 vs 1+2.
It's not about Rust, it's about how/where this serialization is going to be
stored/transfered.
I don't object to 7/8 1+1 though, it's just not clear to me that it is a huge win.

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide