On Wed, 2008-01-23 at 19:52 +0000, Sam Mason wrote: > Haskell has a nice feature where any sequence of punctuation characters > is treated as an infix operator.
Umm. The term "nice" is a value word. It is certainly preferable to going without oxygen for an extended period of time, but not by much. This particular "feature" of Haskell and ML renders (human) program analysis near as dammit impossible when it is actually used. Programs using this feature extensively are completely immune to inspection. If you don't believe me, pick ANY input file in the Isabelle source base that you don't already know, and attempt to explain what it does without reference to other files. I'm also not sure that this feature obeys lexical scoping constraints. Does it? If not, then my negative opinion about it goes up exponentially. I do not believe that any sensible language should admit alterations to the prefix/infix/postfix operators or their precedence. > The custom operator stuff is great because it means the standard library > isn't special and can be more readily extended. It merely means that the parsing of certain tokens can be extended. Extension of the standard library is neither enhanced nor reduced by this feature. > The dynamic specification of infix associativity is probably pretty > tricky to implement, though it does improve expressiveness. Actually, it's *very* easy to implement. What's hard is to understand what a program means when the language supports this feature. shap _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
