|
From: Eduardo C. <way...@gm...> - 2008-06-27 22:49:21
|
Slava Pestov wrote:
> Here's another approach. It is kind of hackish, but I like it!
Very nice. Get's my vote.
> Otherwise, it is a series of name/value pairs:
>
> T{ color { "red" 123 } { "green" 100 } { "blue" 0 } }
> T{ color f 123 100 0 }
I'd like to express my support for a syntax like this:
T{ color red: 123 green: 100 blue: 0 }
Let's line that up with the other proposal:
T{ color { "red" 123 } { "green" 100 } { "blue" 0 } }
T{ color red: 123 green: 100 blue: 0 }
A savings of 15 characters. And this is a small tuple with short names.
The per slot character overhead in the longer version is 7, versus 2 for the
shorter version.
I'm strongly in favor of this syntax. :-)
Ed
PS: Dan's 'tuple-syntax' library implements the syntax that I'm in favor of.
|