Hi, Diego Olivier Fernandez Pons <dofp.oc...@gmail.com> writes:
> List, > > > I was wondering if there was any obstruction to the removal of the > "let" keyword in a syntax for coreML. > > My reasoning is that because everytime there is a "let" there is also > an "=" sign, we could completely remove the "let" and use the "=" sign > instead to identify new symbol introductions. > > x = 1 > s = function x -> x + 1 > d = s 1 > o = function f g -> function x -> f (g x) > > The only cases to handle would be > - comparison "=" sign : replaced by "==" > - let rec : could be ignored or replaced by something else like "=|" > - equational style 'let f x y = x + y' : forbid > > Does anyone see anything that could prevent this from being done ? The problem here is that it would cause: - ambiguity with structure equivalence operator - ambiguity in the parser, e.g. the toplevel let bindings are separated by "let", the local lets by pair "let" and "in" - replacement of == would not be good as it is reserved for physical equality - ignoring "rec" - no good too - please see the other thread, it contradicts how the aliasing of values is now used e.g. for extending modules via. include -- Wojciech -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs