Trying to collect some options discussed here and see what they look like with syntax highlighting from various threads (see reference).
// ruby
let map = { a => 1, b => 2, c => 3 };
// kotlin
let map = { a to 1, b to 2, c to 3 };
// swift
let map = [ a: 1, b: 2, c: 3]
let set = {1, 2, 3}
let map = {{ a: 1, b: 2, c:3 }};
let set = [[1, 2, 3]];
map[[a]]; // returns 1.
let set = {<1, 2, 3>};
let map = Map {a: 1, b: 2, c: 3};
let map = {|a: 1, b: 2, c:3|};
let set = {<1, 2, 3>};
let map = {: a: 1, b: 2, c: 3 :};
let set = {. 1, 2, 3 .};
// Are these impossible?
let map = <a: 1, b: 2, c:3>
let set = <1, 2, 3>;
map<a>; // returns 1
let map = { a = 1, b = 2, c = 3}
map{a}; // returns 1.
Notes:
[] = lists
() = tuples
{} = maps
<> = sets
@waldemarhorwat would you be able to eye-ball some of these options and identity which are syntactically feasible and which are not?