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

Michael Richardson <mcr+ietf@sandelman.ca> Thu, 24 February 2022 14:23 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 A7FAE3A02F9 for <cbor@ietfa.amsl.com>; Thu, 24 Feb 2022 06:23:40 -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 3T-PMsFjYmSl for <cbor@ietfa.amsl.com>; Thu, 24 Feb 2022 06:23:35 -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 2605C3A011B for <cbor@ietf.org>; Thu, 24 Feb 2022 06:23:33 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id D614E392BD; Thu, 24 Feb 2022 09:32:08 -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 8PWEo6nIbtnr; Thu, 24 Feb 2022 09:32:06 -0500 (EST)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 9D6F7392AC; Thu, 24 Feb 2022 09:32:06 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sandelman.ca; s=mail; t=1645713126; bh=KlSnBPavetozkMPLIMfH5uE8q3BnGx9z87Y1Ls7BT0o=; h=From:To:cc:Subject:In-Reply-To:References:Date:From; b=mUHT/8xN4s7QYeo80PHIwkK1+oBHSnqlOeNjiOTuEmfE/duSkDmocckmZpSFXfNzw +jjuRHyVKPAAfofY5R3mexZBVpscI/Y4n1XyaWHnPWnsdBMqW+nTlu9Ed3FneJ58ml 8R0rkjtPbKANCzQsECVjHN9ZRTdYmOzSv/iK7TVVtGDwK09JicjQt5nWZva0dzzD66 ib4Nc3G3BKkscfSuC/qaroMtTvfFigIvtId4oEFEK9XPkbNGygKdTwrw4vZpVxyV63 ZfxHVcSpJolz+AtzGOQ5u0kPyYMZFCPconfr56Wt5adWv0ewvRJ87XhXGEh8UMkTbd Cs4A9hTbwFylA==
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id DCC8B65; Thu, 24 Feb 2022 09:23:28 -0500 (EST)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Michael Peyton Jones <michael.peyton-jones@iohk.io>
cc: Carsten Bormann <cabo@tzi.org>, Duncan Coutts <duncan@well-typed.com>, cbor@ietf.org, Jared Corduan <jared.corduan@iohk.io>, Alexander Byaly <alexander.byaly@iohk.io>
In-Reply-To: <CAKoRMYHyRz7he5qRjCLSQ0v0zDq6y16oJ_dHzjHJSjV1O013Gg@mail.gmail.com>
References: <9300a81abc33a45a9f3c7c1c62da88908280e54a.camel@well-typed.com> <1D3EF118-0223-43BC-81B2-369D4515DB21@tzi.org> <1ce2c092d3214d5fdce59435fc10b084c1ba48ca.camel@well-typed.com> <DFCBE61C-35B2-42A2-8D1A-A633CF939154@tzi.org> <2e10456c5791a422bf7218e7b84051f2b7121b66.camel@well-typed.com> <CAKoRMYGcwrhVWd-J3dX75WZfc+T_oyb6NCUNaeCXMW5_-VYdTw@mail.gmail.com> <52EDB93C-827A-465F-B644-51B3EF590D06@tzi.org> <C9D895BB-40E6-431F-958F-AC031DE4FB58@tzi.org> <CAKoRMYG9X0JF4ehkMc30_UNi0JtT2YMeG4RgxznS6O3Di6pkRA@mail.gmail.com> <CAKoRMYHwewaYxkX=CsfETBbdV7c9U97jfbd9xg=PyrMX5vJhnA@mail.gmail.com> <3B3B7EF0-152B-4015-8485-B204F7AEFFBC@tzi.org> <CAKoRMYFbEG=TkuZPPOiXv2DjEh23Ujd_Q44kQqiWPGc_0GMTuQ@mail.gmail.com> <CAKoRMYHnF6fGJp1dTrJnRHFTBOhreLRwzR_=cCckW1nBXOEz0A@mail.gmail.com> <E8A9E016-2248-4BB9-9864-C6C7D52A4AE5@tzi.org> <CAKoRMYE+gmWyCL9zYDa-O-c3KV_iuzgYuS+Q4fi=U7VHDNDtkQ@mail.gmail.com> <CAKoRMYFdAr1YY3mtmY0NU5X9Bk8_4WYh7bC0CtXpZc3toLSu8g@mail.gmail.com> <CAKoRMYH3MTMi_tX5KHF-O-DTKzo piGqe3fi6XjkPaGCM4823OQ@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> <26378.1645659038@localhost> <94A53D04-2C5A-4965-A65C-4B1C2815647A@tzi.org> <CAKoRMYHyRz7he5qRjCLSQ0v0zDq6y16oJ_dHzjHJSjV1O013Gg@mail.gmail.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:23:28 -0500
Message-ID: <9905.1645712608@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/T108BW26FyeNPdjfjWcDAWf3Eyk>
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:23:41 -0000

Michael Peyton Jones <michael.peyton-jones@iohk.io> wrote:
    > of them for this purpose. Again, the argument for the number of tags is
    > from experience: data types with more than 100 alternatives are
    > *vanishingly* rare, and likely machine-generated if they exist at all.

Like, a code path for each CBOR tag value :-)

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