[Cbor] Mutable/Immutable (Re: hildjj/cbor-map-entries: Explicit Map datatype for CBOR, in array format)

Carsten Bormann <cabo@tzi.org> Thu, 18 February 2021 22:44 UTC

Return-Path: <cabo@tzi.org>
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 C5C6A3A195B for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 14:44:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, 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 hl6zsKrf1ZF5 for <cbor@ietfa.amsl.com>; Thu, 18 Feb 2021 14:44:20 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 491A13A1958 for <cbor@ietf.org>; Thu, 18 Feb 2021 14:44:20 -0800 (PST)
Received: from [192.168.217.152] (p5089a828.dip0.t-ipconnect.de [80.137.168.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4DhVBV2n2tzySy; Thu, 18 Feb 2021 23:44:18 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <2631BC6B-F0D2-4756-B129-1B52F18EB6B1@cursive.net>
Date: Thu, 18 Feb 2021 23:44:17 +0100
Cc: cbor@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <1A224687-3725-41FE-A23A-5A730F88BFDE@tzi.org>
References: <87zh02kpf5.fsf@hobgoblin.ariadne.com> <0faeb37c36d5b1f40c37f82e62be1be9@mothers-arms.co.uk> <ED6F6174-2643-4B7F-8ED7-414DD5FD9C39@tzi.org> <F6BDBA57-34F4-46FE-9806-6A227AC214EA@mothers-arms.co.uk> <DC0D444C-3231-4029-B0BB-5EC02863B72A@cursive.net> <999B078D-C4B2-4B04-8487-7ECEFEB953DF@cursive.net> <94bbc990fcf388ae5fd01c06274ed58a@mothers-arms.co.uk> <72053102-1BA1-4281-9F17-CF7A65EEA907@island-resort.com> <05798259-49C4-4442-84A3-9FD13D0BDB5B@tzi.org> <cbc320f27386e06a674a02c0f2f1b6e6@mothers-arms.co.uk> <2631BC6B-F0D2-4756-B129-1B52F18EB6B1@cursive.net>
To: Joe Hildebrand <hildjj@cursive.net>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/Y86cN3FSm7_91Thnjr8E6CzU6tA>
Subject: [Cbor] Mutable/Immutable (Re: hildjj/cbor-map-entries: Explicit Map datatype for CBOR, in array format)
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, 18 Feb 2021 22:44:24 -0000


> On 18. Feb 2021, at 20:58, Joe Hildebrand <hildjj@cursive.net> wrote:
> 
> Oh, that reminds me.  If https://github.com/tc39/proposal-record-tuple progresses a little bit more, I'm also going to be interested in explicit mutable and immutable tags.
> 
> Putting an immutable tag around a map key would make Kio's example very clear.

The structures created by record-tuple are deeply immutable, so the below may not be relevant for your use case.

How would mutable and immutable interact?
I assume an immutable tag make its whole content immutable.
Can you get back using a nested mutable?

What is the default state at the top?

Grüße, Carsten