On Tue, May 17, 2011 at 8:42 PM, Graydon Hoare <[email protected]> wrote: > - rec(a=b, c=d) will change to {a: b, c: d} as a value constructor. > > - rec(int a, int b) will change to {a: int, b: int} as a type > constructor. > > - tup(a,b) will change to (a,b) in both type and value grammars; Might as well get all bike-shedding out of the way now... is there any merit in using {} for both rec and tup? I mean, express a tuple like a record with anonymous members. rec(int a,int b) becomes {a:int, b:int} and tup(a,b) becomes {a,b}. I've seen this before, maybe in Lua? I'm just thinking if you have auto x = (1+2+3,4+5+6) vs. auto x = (1+2+3+4+5+6) you have to read quite a way in to tell if it's a tuple or an expression in parentheses.
Pete _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
