Re: [q-lang-users] A proposal to adopt Python tuple syntax
Brought to you by:
agraef
From: Tim H. <q...@st...> - 2005-06-24 10:47:19
|
Albert Graef <Dr....@t-...> writes: > Hi, Tim, > > > I've not really been bitten by it except as a result of programmer error - > > I might get temporarily confused whether I want to write > > map (lambda (N) (N+1)) [1..10] > > ^ ^ > > or not (and in this case, not), but that's it. > > Yup, that's actually the foo(99) thing in disguise. In my experience > that's actually the most common source of confusion. So that speaks in > favour of John's argument. I agree that if you really have to constantly > think about those situations, then it should be changed. OK. [snip] > > At first blush, I don't mind (and might even favour) having a different > > syntax for forcing something to be a tuple - say use [] for lists, () for > > parenthetical purposes *only*, which leaves <> or {} for tuples? > > <...> doesn't work, e.g., how should something like < 5 > 3 > 1 be > parsed, is it ((< 5 >) 3) > 1 or (< (5 > 3) >) 1 ? Very good question. OK, scrap that for a lark :) > Concerning the curly braces, it might be a good idea to keep {...} for > possible future extensions (Haskell-style records come to my mind). You read my mind ... or at least the other mail I just fired-off, partly inspired by this idea. > So I'd actually prefer to keep using the parentheses for tuples, John and > I even agree on that point. ;-) > > Tim, if I understood you correctly, you don't really have any objections > against the current notation, but wouldn't mind a change either. Is that > correct? Could you live with that "trailing comma" thingie? Would the change *require* trailling comma, or just permit it on the grounds of forcing something to be a tuple? Not that I'd object either way, really. No complaints here, it does seem less insane than abusing <> for the purpose :) ~Tim -- <http://spodzone.org.uk/> |