25 Oct
2016
25 Oct
'16
10:11 p.m.
We have a syntax to create strings with variables automatically inferred from its context:
name = "Guido" print(f'Hello {name}') Hello Guido
Similarly, I'd like to suggest a similar feature for building dictionaries:
foo = 1 bar = 2 {:bar, :foo} {'bar': 1, 'foo', 2}
And a similar way to get the content from the dictionary into variables:
values = {'bar': 1, 'foo', 2} {:bar, :foo} = values bar 1 foo 2
The syntaxes used here are of course just to illustrate the concept and I'm suggesting we must use those.