On Fri, Jul 10, 2009 at 12:24 PM, Walter Bright<[email protected]> wrote: > Bill Baxter wrote: >> >> On Thu, Jul 9, 2009 at 9:09 PM, Walter Bright<[email protected]> >> wrote: >>> >>> Bill Baxter wrote: >>>> >>>> If it's internal to the parse tree can't you make the syntax whatever >>>> you >>>> want? >>>> Something like (expr1 __exprSequencer expr2) should do just fine, right? >>>> No reason it has to be a precious one-character symbol syntax. >>> >>> What if you're writing a program that generates D code? >> >> If you're generating code which is so tricky that it needs to rely on >> comma expressions, > > Writing code that requires that "A" be executed before "B" is not tricky or > unusual.
Right. And usually that's written A; B Writing code that requires A to be executed before B *and* requires that the whole thing act like a single expression is much more rare. >> then I doubt it will be something that users will >> be expected to read and/or edit. In which case, again, it doesn't >> matter how ugly the syntax is. "__exprSequencer" would do just fine. > > Making D metaprogramming spectacularly ugly will not help bring > metaprogramming to the mainstream and will drive away the kind of people who > can create fantastic metaprogramming applications. Then pick something less ugly! Double colon is still free in D isn't it? My point of arguing this is just that I'm still hoping commas could be used to make a tuple literal syntax. And now Andrei is going to jump in and say "why do we need that? We want to fish not eat fish, lookee I've made a fish hook for you, it's spelled: "Tuple!()"" or somthing like that. P.S. making compile-time reflection spectacularly ugly is also not a good way to bring metaprogramming to the mainstream. (Looking at you, __traits). P.P.S. on the other hand, Python uses double underscores all over the place and people call it a beautiful language. Go figure. I guess it's only ugly till you have a few dozen of them. Then it's a "pattern". --bb
