On Thu, Mar 5, 2009 at 1:33 PM, Pal-Kristian Engstad <[email protected]> wrote: > I've used OCaml a lot, but I actually prefer Haskell's let binding. > > In Haskell, I can write: > > let { x = 1; y = 2 } in x + y > > let x = 1; y = 2 in x + y > > let x = 1 > y = 1 > in > x + y
This is a completely separate issue. For the moment, the question I want to focus on is how to separate the end of the expression that is scoped by the let from the end of the entire let. Let's stick with that. I have no position on the many Haskell syntax variants, except that two choices are almost always worse than one, even if the one choice is a bad one. > Personally, I hate > that OCaml has reserved the word "and". I agree, and I had noted this. However, the situation for BitC is that AND must be a reserved word in any case, because BitC does eager evaluation. Because of this, it may be possible to syntactically distinguish expr AND expr expr AND bindingPattern = expr in the parser. If that is the case, then using and as a keyword for collections of bindings would not preclude use in expressions. I haven't yet had a chance to look at this. I agree that clobbering AND seems very unfortunate. I suggest that before we get into a holy war over this we learn what is easily feasible in the parser. The meta-issue is that whatever syntax we use for sequencing of bindings must be distinguishable from the syntax for sequencing of expressions. shap _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
