This is probably a feature request.
Would it be possible to add similar Dictionary literal as is already in Swift? It would make even more sense with new RTL, that could house underlying dictionary type for all supported platforms.
In Oxygene the syntax could be - the same as in Swift:
var myDictionary1 := ["SampleKey1" : "SampleValue1", "SampleKey2" : "SampleValue2"]; { Dictionary<String, String> }
var myDictionary2 := ["SampleArrayKey1" : [1, 2, 3], "SampleArrayKey2" : [1, 1, 2, 3, 5, 8]]; { Dictionary<String, array of Integer> }
At this time, creating such construct is inelegant, I use this way:
var myDictionary1 := InitializeDictionary1;
method InitializeDictionary1: Dictionary<String, String>;
begin
result := new Dictionary <String, String>;
result.Add ("SampleKey1", "SampleValue1");
result.Add ("SampleKey2", "SampleValue2");
end;