Re: [Cbor] Do we care about array-tags issue 6, clamped-uint8 arrays?

Jeffrey Yasskin <jyasskin@google.com> Thu, 25 July 2019 20:36 UTC

Return-Path: <jyasskin@google.com>
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 6BF731201EF for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2019 13:36:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.5
X-Spam-Level:
X-Spam-Status: No, score=-17.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 uqRG0YPfgLCy for <cbor@ietfa.amsl.com>; Thu, 25 Jul 2019 13:36:55 -0700 (PDT)
Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 4FB3E1201DB for <cbor@ietf.org>; Thu, 25 Jul 2019 13:36:55 -0700 (PDT)
Received: by mail-lj1-x22e.google.com with SMTP id i21so49309625ljj.3 for <cbor@ietf.org>; Thu, 25 Jul 2019 13:36:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cGox2Jfh4pZfRVJG8qR0sJDZaTQPamSV07Rrlt5u42M=; b=TML7DOaycr2CekrzNAFfF564h7kHB0ZHbQh0KQIO2Ff2vICEqzCWfGMYW8IXOXBVl9 gp4UtWmOyWV/CHfUjsSXR1CeeO1yUZdNb3X/9dk9nmT9MeJxPYVXHkqvfuftLonQjIHK 8N5lBExD30G2O6PHMqCOcO/1/BdpT7EZx9MZTKQbqqVnE3CtytIPEAt5Ohg6Buy1wKdQ /CZ6cBhSy67oXSiH43Wsrr9SAu7wkY5c7ZTGxmv4Pwl5V9zAahKzTM8ffynrYzAw3/zr wvoxHkNQqmMdGZF3UK1iBxEN/sloX6xK42DVY8m8sPD5co87XI2nD9UPJJSSfkBj1uHg M/aQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cGox2Jfh4pZfRVJG8qR0sJDZaTQPamSV07Rrlt5u42M=; b=OPWyw+KGjwraxwtOt7yzybB3utYy7azedOprLsuwOqS7guTH8w7LIAPmOX2wIZLBuJ m+uyk+iNkDJvkP0OI+3viZ5oy2gxKEsxE6KRsM+WLSx+Sr3lt5o4KiHFpG8M3MGFsYBJ q1rMSXBV4khuRg5ZuwEkhZfCfJy/+vkuFhh46wr1Z851Hl55+7H5IMcQzfVIja6hLmQ3 e79vcXXyodkHTMwBvpjRYgXhkBi69mHmucytV+BbyKZeSw9TrpfAjQJj1JFBwgP3KrJP imJgECvtHfQ+AQS+NRoNskTph0o8a0O2W7mgFCNUxwTQkQ21QyTLHPpRgRNfBe/bIXKi z9XA==
X-Gm-Message-State: APjAAAVHVKJ7wnwVhS+pkm5z+EcT15vj+hfSDL591n5xePf3sqEK6ofY AyUzvzogix3AL9TadrPq98GO81wVjTbLIgDN91Ddog==
X-Google-Smtp-Source: APXvYqwPkAflqrU/INaLJSRAu5YyTzkuAWjJyj/u/5/rTcttCRCSht7R20xiJRstl50X0SMMz3L5xBgm/HyAcgCdLKQ=
X-Received: by 2002:a2e:8e90:: with SMTP id z16mr25432228ljk.4.1564087013142; Thu, 25 Jul 2019 13:36:53 -0700 (PDT)
MIME-Version: 1.0
References: <CANh-dXkkSJUOcHcBj1JRO20ULFVNNbu1GQU-j7bR7N-FCTt3HA@mail.gmail.com> <24038E27-C30B-47F4-91E8-68C02FCAE26D@tzi.org> <CANh-dXm0TLShk_9DT9fKq0CR4yJMr6=zntWL8fW2tB99o0Et3Q@mail.gmail.com> <3246C0B0-C5BF-4AC8-B99F-D9A44B780A2C@seantek.com> <DECE061A-328D-4B1B-BEB5-D73F5779B554@tzi.org> <1C432DAE-ABAA-4E02-84FB-57109563A86F@seantek.com>
In-Reply-To: <1C432DAE-ABAA-4E02-84FB-57109563A86F@seantek.com>
From: Jeffrey Yasskin <jyasskin@google.com>
Date: Thu, 25 Jul 2019 16:36:40 -0400
Message-ID: <CANh-dX===wNGksTGUEjireODnQHPmUJQUJ7XJh+U-4bGGjErfg@mail.gmail.com>
To: Sean Leonard <dev+ietf@seantek.com>
Cc: Carsten Bormann <cabo@tzi.org>, cbor@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/cIlnSO3mrxsXTlEg-pk0jLoAlKs>
Subject: Re: [Cbor] Do we care about array-tags issue 6, clamped-uint8 arrays?
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, 25 Jul 2019 20:36:58 -0000

On Thu, Jul 25, 2019 at 4:17 PM Sean Leonard <dev+ietf@seantek.com>; wrote:
> This thread raises an interesting point, namely, using CBOR tags to identify the type of object in protocol that exists elsewhere in an object oriented system, such as in other standards or other implementations. “Uint8ClampedArray” does not exist in JSON, but it exists in JavaScript/ES6 (which is both a standard and is backed by multiple conforming implementations.) I think this is a good design pattern and should be liberally employed with more CBOR tag use.
>

I think that's a good description of the disagreement. I remain
uncomfortable with having a serialization format describe behaviors
that the data had or should have when it was or is loaded into a
program. The serialization should instead describe the meaning of the
data. That will correlate with the types of objects that store the
data inside a program, but it shouldn't directly determine the types.

That said, it seems unlikely that web platform uses of CBOR will use
tags, so this doesn't affect me enough to make me care that much.

Jeffrey