EDIT: The syntax I decided to go with (arbitrarily) looks something like value[key] { key_expr : value_expr[, ...] };. Patch attached to this post. Note that said syntax can be swapped out fairly easily.
I'm considering playing around some more with ASH's internals in my spare time, and I wanted to know a) how many people want this feature, and b) what the desired syntax is.
Examples of existing styles:
JSON
Perl/Ruby (and more, I'm sure)
C# (well, okay, this barely counts):
Lua:
Python named tuples:
Granted, we don't have to look at existing implementations in current languages. We could do something totally crazy like <Key1|Val1; Key2|Val2>, but that'd probably confuse everyone involved, since that'd add new meanings to four (!) pre-existing symbols.
Thoughts?
I'm considering playing around some more with ASH's internals in my spare time, and I wanted to know a) how many people want this feature, and b) what the desired syntax is.
Examples of existing styles:
JSON
Code:
{ "key1":"value1",
"key2":"value2" }
Perl/Ruby (and more, I'm sure)
Code:
{ 'key1' => 'value1',
'key2' => 'value2' }
C# (well, okay, this barely counts):
Code:
new Dictionary<string, string>
{
{ "key1", "value1" },
{ "key2", "value2" }
};
Lua:
Code:
{ key1="value1", key2="value2" }
Python named tuples:
Code:
{ key1="value1", key2="value2" )
Granted, we don't have to look at existing implementations in current languages. We could do something totally crazy like <Key1|Val1; Key2|Val2>, but that'd probably confuse everyone involved, since that'd add new meanings to four (!) pre-existing symbols.
Thoughts?
Attachments
Last edited: