Chris Lattner <clattner at apple.com> writes:>> Would anyone object if I changed the syntax from !operator to &operator? > > In the absence of a much better proposal, I'd prefer to just keep it the way it is.Fair enough. What would make a better proposal? I'd like to keep the syntax concise. I wonder if there is a way we could get rid of the "operator" entirely and just specify names, like: strconcat("this", "that") instead of !strconcat("this", "that") What do you think? -Dave
On Jan 11, 2011, at 12:27 PM, David A. Greene wrote:> Chris Lattner <clattner at apple.com> writes: > >>> Would anyone object if I changed the syntax from !operator to &operator? >> >> In the absence of a much better proposal, I'd prefer to just keep it the way it is. > > Fair enough. What would make a better proposal? I'd like to keep the > syntax concise. I wonder if there is a way we could get rid of the > "operator" entirely and just specify names, like: > > strconcat("this", "that") > > instead of > > !strconcat("this", "that") > > What do you think?That would be nice. I haven't looked in years, but I thought that there was a parser ambiguity issue. -Chris
Chris Lattner <clattner at apple.com> writes:>> Fair enough. What would make a better proposal? I'd like to keep the >> syntax concise. I wonder if there is a way we could get rid of the >> "operator" entirely and just specify names, like: >> >> strconcat("this", "that") >> >> instead of >> >> !strconcat("this", "that") >> >> What do you think? > > That would be nice. I haven't looked in years, but I thought that there was a parser ambiguity issue.I think it would require removing knowledge of operators in the lexer, just have it return an ID token for the operator name and then have the parser implement a rule: Operator : ID '(' ArgList ')' But I haven't played around with it yet. -Dave