Artifacts Associated With Ticket f9c3463120117afc9c86cbfe2d57da81dbc942e4
Ticket change [024c68e856] (rid 148482) by anonymous on 2016-08-29 19:39:03:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This is a proposal of a change in Tcl syntax: When I want to create a big datastructure (with lists or dicts), I like to write the code in serveral lines for clarity. The problem with this expression: [comand_name arg0 arg1 arg2...] is that backslash are necessary if I want to write that expression in several lines. It's a little bit cumbersome: set big_data_strucutre [dict \ key1 value1 \ key2 value2 \ key3 [list item1 item2 item3] \ key4 value4 \ key5 [list item1 [list item21 item22]] \ key6 value6] Maybe it's better to make backslash optional inside square brackets (similar to braces). It's more clear and it's not necessary to type so much: set big_data_strucutre [dict key1 value1 key2 value2 key3 [list item1 item2 item3] key4 value4 key5 [list item1 [list item21 item22]] key6 value6] - foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "Proposal syntax for list"
- type initialized to: "RFE"
Ticket change [4dfd7458e2] (rid 148483) by dgp on 2016-08-29 21:35:02:
- icomment:
To be clear, you are not proposing a change to list syntax. You are proposing that a newline cease being a command terminator in Tcl script syntax. The remaining option would be a semi-colon, I suppose, but I can offer little hope this bridge would ever be crossed. The good news is you can already have almost what you want without changing any of Tcl's syntax rules at all: set big_data_strucutre [dict {*}" key1 value1 key2 value2 key3 [list item1 item2 item3] key4 value4 key5 [list item1 [list item21 item22]] key6 value6"] - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Pending"
- icomment:
Ticket change [fb622b30b8] (rid 148484) by ferrieux on 2016-08-29 21:52:01:
- icomment:
And one can even make it simpler, knowing that Tcl will internally shimmer the value to a dict as soon as a dict primitive is used: set big_data_strucutre " key1 value1 key2 value2 key3 {item1 item2 item3} key4 value4 key5 {item1 {item21 item22}} key6 value6" - login: "ferrieux"
- mimetype: "text/plain"
- icomment:
Ticket change [2af7fb43df] (rid 149137) by dkf on 2016-10-09 15:51:08:
- closedate changed to: "2457671.16051442"
- closer changed to: "dkf"
- icomment:
I concur. The likelihood that we'll make newline change interpretation in any context is very slight at best, and pretty much zero in this one as it is far more likely to break existing code. A <i>lot</i> of existing code at that.
- login: "dkf"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dkf"