Closed timotheecour closed 3 years ago
AFAIK totes intended, the {"k", "v"}
is meant as sugar for [("k", "v")]
by design, so not a bug.
i know, but this violates the fact that repr
looks differs from $
whereas it often is the same; (very vaguely related to homoiconicity)
ideally an AST would stringify to itself; this could be fixable in $
by distinguishing on whether we pass in a litteral, using this or similar
proc `$`{nnkTableConstr}[T](a: T): string
not a big deal though, closing
repr
does look different from $
.
The reality is often the $
is more popular on usage, then more fixes, then looks better.
not clear whether it's a bug but a TableConstr litteral IMO could print as {"a1": 1, "a2": 2} instead of [("a1", 1), ("a2", 2)]?
Example
Current Output
Current Output
{"a1": 1, "a2": 2} insetead of [("a1", 1), ("a2", 2)] ?
Additional Information
1.5.1 2b5841cd2b096624987d7cd1aa217088447076b7