From fc219653935c1df6c8a196d29fc409e3b41fda4b Mon Sep 17 00:00:00 2001 From: Rikki Gibson Date: Thu, 25 Jan 2024 17:44:45 -0800 Subject: [PATCH] Minor update to CLs WG notes (#7872) --- meetings/working-groups/collection-literals/CL-2024-01-23.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meetings/working-groups/collection-literals/CL-2024-01-23.md b/meetings/working-groups/collection-literals/CL-2024-01-23.md index 0bdf468e74..1be6ea244a 100644 --- a/meetings/working-groups/collection-literals/CL-2024-01-23.md +++ b/meetings/working-groups/collection-literals/CL-2024-01-23.md @@ -24,8 +24,8 @@ Broken down, we see important design needing to be made in the following areas: For example, we could consider things in the following ways: - - `k:v` is simply a shorthand for `KeyValuePair`. And as such, the following would be legal: `List> nameToAgeList = ["mads": 21]` - - `k:v` represents a key-value *association*, and thus should only be usable with dictionary-esque (tbd) types, not sequence-esque types. + - `k:v` is simply a shorthand for `KeyValuePair`. And as such, the following would be legal: `List> nameToAgeList = ["mads": 21]`. This allows for the possibility that `((Collection)[k:v])[k]` may not yield `v`. + - `k:v` represents a key-value *association*, and thus should only be usable with dictionary-esque (tbd) types, not sequence-esque types. This enforces the intuition that `((Collection)[k:v])[k]` yields `v`. As part of this, we want to figure out what expressions elements can mix/match with what target types. For example (as shown above) can a `k:v` element be used with a sequence-type? Can a normal expression element be used with a dictionary type (e.g. `Dictionary x = [kvp1, kvp2]`)?