On Sunday 30 November 2008 08:37, Dmitri wrote: > I agree that the consistency that the s-expressions provide is > valuable, and hence it would be counter productive to allow different > kinds of syntax. However, it makes sense to have an explicit way to > do infix notation.
That seems self-contradictory. > As Johan points out above, Haskell has a very > elegant way of infixing functions eg: > > div a b > can be written as > a `div` b > > And it seems that using a macro which accepts arguments in infix > notation would allow the code to be more expressive and readable. Maybe, but only if it's possible, and I don't think it is with sufficient generality to be worthwhile. > The formula example Jeff provides is quite readable without requiring > any additional language features. > > A general version which does not check operator precedence would > provide a way to use infix notation to make the code more readable. Infix without at least an operator precedence scheme is not going to make anyone more comfortable, since you'll have to fully parenthesize everything anyway or else limit it to associative-commutative functions. I just think this is a very wrong-headed way to approach a Lisp. The language is what it is and you should meet it head-on and use it on its own terms. If you like syntactic sugar, including programmer-defined infix operators, check out Scala. It's got syntactic sugar in spades. Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---