(On the other hand, the remark that the existing uses of keyword-bang in the language, namely (method!) and (open!), could now be represented as annotations is fairly reasonable.) On Mon, Jan 19, 2015 at 9:34 AM, Alain Frisch wrote: > On 01/19/2015 08:33 AM, oleg@okmij.org wrote: > >> Current OCaml syntax has shortage of pattern binding expression and >>> only usable is let%xxx p = e in which is a bit pain for ppx writers. >>> >> >> Indeed. One may wish that >> >> let rec p = e1 in e2 >> >> were treated as if it were >> let[@ocaml.let "rec"] p = e1 in e2 >> >> and likewise let module. >> > > Please, no! Attributes are intended to add meta-data for external tools > (ppx, tools parsing .cmt files, etc), perhaps also to tweak the behavior of > the compiler (trigger/control warnings, etc), certainly not to encode core > language features (otherwise, let's use s-expressions instead of > Parsetree). Facilitating language experiments is also a good use for > attributes, but not as a long-term solution for the official compiler. > > Come to think of it, 'rec! or 'module' are >> annotations on let. >> > > "let module" has a different shape (module identifiers/types/expressions) > than "let". And it doesn't seem realistic to merge, say, core types and > module types, or core expressions and module expressions. > > > Alain > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >