Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-05-01 Thread Richard Jones
For the record, here's a better version by bluestorm: http://bluestorm.info/camlp4/pa_matches.ml.html Rich. -- Richard Jones Red Hat ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-27 Thread David Teller
I think this would be useful. However, you can already do it in a slightly more complex fashion. From the top of my mind, with let ( /* ) f g = f g let ( */ ) f g x = g f x you can achieve 1 /* mem */ [1;2;3] with the added bonus that a C programmer will never be able to read your code :)

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-26 Thread Richard Jones
On Fri, Apr 25, 2008 at 01:37:47PM -0700, Arthur Chan wrote: Would it be difficult to have python-like syntax for List.exists? Could we add it to Hashtbl and Array too? I'm not too fond of python's general sloppiness, but the (x in mylist) syntax seemed very pretty to me. At the least, it

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-25 Thread Richard Jones
On Thu, Apr 24, 2008 at 04:52:50PM +0100, John Whitington wrote: On 24 Apr 2008, at 16:49, David Teller wrote: * what kind of syntactic sugar is absolutely missing from the language ? I'd like a keyword matches, so I can write map (matches (0, _, _)) l rather than map (function

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-25 Thread Richard Jones
On Thu, Apr 24, 2008 at 10:53:36PM +0200, Berke Durak wrote: We absolutely need a standard serialization solution. I'm thinking of Sexplib of course but it could be another one. The reason it must be standard is that it's difficult to provide serialization/deserialization functions outside

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-25 Thread David Teller
The current plans are to have two sets of extensions inside Batteries Included: * a few will be opened by default * some others will just be part of the distribution, with instructions in a common format, regarding how to activate use them In either case, we will probably have a slightly

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-25 Thread Richard Jones
On Fri, Apr 25, 2008 at 06:59:50PM +0200, Berke Durak wrote: That would allow people to easily write tools that examine object files without relying on the unnecessarily britlle binary format. At the very least you could open it in a text editor and see if everything's OK inside, or simply

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-24 Thread Dario Teixeira
Hi, Thanks for your initiative, David! * which syntax extensions do you use so often that you consider they should be part of the language ? Though there are a few so useful (open_in, list comprehensions) they can almost be considered standard, I still don't think their inclusion by default

Re: [Caml-list] [OSR] Standard syntax extensions ?

2008-04-24 Thread Jon Harrop
On Thursday 24 April 2008 17:41:17 Martin Jambon wrote: On Thu, 24 Apr 2008, David Teller wrote: * which syntax extensions do you use so often that you consider they should be part of the language ? None because it creates unneeded dependencies between unrelated libraries. Agreed. There