From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4B0067EEB4 for ; Mon, 4 Feb 2013 19:59:50 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=pra; client-ip=84.93.230.235; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=mailfrom; client-ip=84.93.230.235; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@avasout07.plus.net) identity=helo; client-ip=84.93.230.235; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="postmaster@avasout07.plus.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtABADkEEFFUXebrlWdsb2JhbABFvz0WDgEBAQEJCwkJEimCJggCMBsxBWg/AQQeBYgFmwigeJFSA44Hm2U X-IPAS-Result: AtABADkEEFFUXebrlWdsb2JhbABFvz0WDgEBAQEJCwkJEimCJggCMBsxBWg/AQQeBYgFmwigeJFSA44Hm2U X-IronPort-AV: E=Sophos;i="4.84,602,1355094000"; d="scan'208";a="1039277" Received: from avasout07.plus.net ([84.93.230.235]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Feb 2013 19:55:03 +0100 Received: from WinEight ([84.93.180.99]) by avasout07 with smtp id wJzn1k003294Gsc01Jzoaz; Mon, 04 Feb 2013 18:59:48 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=H5sFNZki c=1 sm=1 a=PAy2fcRYZjOZrvRM8fVqmg==:17 a=Xub9RBUEA-sA:10 a=kj9zAlcOel0A:10 a=r2vSxAw-AAAA:8 a=ARW3atLyP-0A:10 a=AbCvI5i_BOced_4TPBoA:9 a=CjuIK1q_8ugA:10 a=PAy2fcRYZjOZrvRM8fVqmg==:117 From: "Jon Harrop" To: "Caml List" Date: Mon, 4 Feb 2013 18:59:32 -0000 Message-ID: <02b901ce0309$c555da10$50018e30$@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac4DCYH68tk9mVfGSaOF3vzNvhVXQw== Content-Language: en-gb Subject: [Caml-list] View patterns FWIW, two of the most common camlp4 parsers in the wild, stream parsers and bitstring, are solved in F# using view patterns. I suspect many other applications of camlp4 would be written in terms of view patterns. Moreover, it strikes me that consideration so far on things like F#-like attributes is an orthogonal issue so perhaps support for that and support for view patterns would do a much better job of displacing camlp4. I use view patterns to write parsers in F# but I would prefer a camlp4-like technology to write parsers in-line. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com