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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id D41FC7FA60 for ; Fri, 21 Apr 2017 21:12:04 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yminsky@janestreet.com; spf=Pass smtp.mailfrom=yminsky@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.78; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yminsky@janestreet.com designates 38.105.200.78 as permitted sender) identity=mailfrom; client-ip=38.105.200.78; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.78; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A4s/kQxzB9KvK+PjXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?1OMfIJqq85mqBkHD//Il1AaPBtSHraocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze6/9pncbglSmDaxfa55IQmrownW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cv?= =?us-ascii?q?pvrgowD5irWMKaHtig?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CCAQDxWPpYfU7IaSZcHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBhRYHg2CKFZFolWSCD4JugzYChAQHPxgBAQEBAQEBAQEBARIBAQk?= =?us-ascii?q?WCFeCMyIBgkABAgMjHQEBNwEPCwsDCgICJgICIhIBBQEcBhMUCol+A505P4sda?= =?us-ascii?q?IImgwgBAQWIEQEBAQEBAQEDAQEBAQEBARkIEnmFSIR2h12CX4k4iCqLZJMGinW?= =?us-ascii?q?GYpJRFB+BFR+BPiYdCBgVRBgGhDwOHYF/WYk2AQEB?= X-IPAS-Result: =?us-ascii?q?A0CCAQDxWPpYfU7IaSZcHAEBBAEBCgEBFwEBBAEBCgEBhRY?= =?us-ascii?q?Hg2CKFZFolWSCD4JugzYChAQHPxgBAQEBAQEBAQEBARIBAQkWCFeCMyIBgkABA?= =?us-ascii?q?gMjHQEBNwEPCwsDCgICJgICIhIBBQEcBhMUCol+A505P4sdaIImgwgBAQWIEQE?= =?us-ascii?q?BAQEBAQEDAQEBAQEBARkIEnmFSIR2h12CX4k4iCqLZJMGinWGYpJRFB+BFR+BP?= =?us-ascii?q?iYdCBgVRBgGhDwOHYF/WYk2AQEB?= X-IronPort-AV: E=Sophos;i="5.37,230,1488841200"; d="scan'208";a="269979013" Received: from mxout1.mail.janestreet.com ([38.105.200.78]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 21:11:59 +0200 Received: from [172.27.56.68] (helo=tot-qpr-mailcore1) by mxout1.mail.janestreet.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1d1dyI-00060P-Fj for caml-list@inria.fr; Fri, 21 Apr 2017 15:11:58 -0400 X-JS-Flow: external X-JS-Scanner-attachment: (ok) No attachments Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BY-ll--A4hM9j-O0; 2017-04-21 15:11:58.479223-04:00 Received: from mail-vk0-f70.google.com ([209.85.213.70]) by mxgoog2.mail.janestreet.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1d1dyI-0005fa-EB for caml-list@inria.fr; Fri, 21 Apr 2017 15:11:58 -0400 Received: by mail-vk0-f70.google.com with SMTP id a77so2391011vke.0 for ; Fri, 21 Apr 2017 12:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=93NIGaYhxM4DThEh4ws+Ci6gX9I/cEIZ0Fu5WfU/NYk=; b=kGz9JARSsPpWhydbjKj3MfrkPvuJ4nLFyz0iR60VY9FRNcovqk5KRR6IIEFMz2bldr EN8e9ER8bWRHC43kNLRqZG7cv2Bj0pJkRnuEIqUb9dv0Tq/jRNdzIsq0KTyM749d6fDj qBTP0tewvd04629uVhp04NdePp2ypUG64fRhE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=93NIGaYhxM4DThEh4ws+Ci6gX9I/cEIZ0Fu5WfU/NYk=; b=bImYX+1lMy2eev4m1h/+TlTnejrlICiFfacpVhdqGXHKya+2iuCjFdY6D/Itko8GyK AcP+W75Y6EmyZYqwBoaMJ8JykVNfbMdQEBumd9sP10blIUhnq93QtfMaxij6bHZ/nvcL 8L8GM8VuxQlNxrKbjBqCKMHL0GDpbZlifHXDQWd0uHiiWvRh9juLoYi1ZavGDI0k7vLl xqw7BdL/JwwAYO4XgIVGsmHIolty/vtfrUP/qZ/b04YvbN8PjHx71bQDLcRJ0cElpMr0 IpO7dLwZlIdBYraIHsbLEXX7nJBk8q9jhs26WEPRWICLIeifl1Rc1xJiVZoiHYwlijqr cQDQ== X-Gm-Message-State: AN3rC/6GhfLCe+1jgz641SVoiyULc3kHw4zhFs9k1RY9kKCvkOCFfPSy g17g7CsLIo3RUKPEeNJ/ymTf86Tf/gIrgZaCo/yL+MIgIpt63kxclqJD+W+IyCnN9l3Vseozdbz js3/pM84K/T6CzyBA X-Received: by 10.31.4.80 with SMTP id 77mr6732985vke.17.1492801908888; Fri, 21 Apr 2017 12:11:48 -0700 (PDT) X-Received: by 10.31.4.80 with SMTP id 77mr6732978vke.17.1492801908599; Fri, 21 Apr 2017 12:11:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.206.197 with HTTP; Fri, 21 Apr 2017 12:11:28 -0700 (PDT) In-Reply-To: <58FA282A021A076200390603_0_57023@msllnjpmsgsv06> References: <58FA282A021A076200390603_0_57023@msllnjpmsgsv06> From:Yaron Minsky Date: Fri, 21 Apr 2017 15:11:28 -0400 Message-ID: To:Hongbo Zhang Cc:"caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 X-JS-Exim-Data-Received: 2017-04-21 15:11:58-0400 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] PPX is harmful to our community in the long term I understand the frustration, but I think your conclusion is misplaced. PPXs are massively helpful when building serious software. Having automatic generation of pretty-printers, comparison functions, hash functions, binary protocols, and the like is a huge win for both programmer efficiency and correctness. The Haskell folk aren't wrong to care about deriving, and the schemers aren't crazy to want their macro systems. In short, I think abandoning syntactic abstractions is madness. I agree that the portability problems are serious and should be addressed, but ocaml-migrate-parsetree seems like a solid step in the right direction. y On Fri, Apr 21, 2017 at 11:41 AM, Hongbo Zhang (BLOOMBERG/ 731 LEX) wrote: > Dear OCaml developers: > Given that bitten by PPX from time to time, finally, I think it is a time to > spend two hours sharing my experience with PPX and why you(the OCaml library > developer) should avoid PPX as much as you can. > > Here is a story I just experienced this morning, I tried to install a > package from opam, and it complained my compiler is too old - 4.02.3, to be > honest, 4.02.3 is still a pretty modern OCaml compiler, even debian stable > still stays on 4.01. Anyway, I switched to 4.04.1, after half an hour, it > failed to compile again, complaning about some ppx error message. This is > not my first time experience, and finally it made me to write an essay about > why PPX is harmful. > PPX is a compiler plugin, it imposes a very large compiler surface API to > your library, and we don't have any backward compatibility guarantee from > the compiler, which means your library will only work against a specific > compiler. Even worse, OCaml is an elegant but small community, we don't have > too many maintainers for a library, if you have a library which relies on > PPX (the dependency chain could be really really huge, for example, > ppx_metaquot depends on typing environment, you can find lots of stories > about node_modules in Node community), it will probably not work against > next version of OCaml compiler, and it will be a huge maintenance overhead > for other people to pick it up. > > OCaml is already a very expressive language, probably more expressive than > any other mainstream language, (Go, Java, C/C++, etc), it is fine to write > some boilerplate code, or we can cut PPX as a dev dependency, after your > PPXed your code, check in the generated source code(via -dsource), so it > will not bring dependency to end users. > There are some valid use cases of PPX, for example, in BuckleScript or > JS_of_OCaml, we want to customize OCaml language a bit for external FFI, or > if you have a very large team, and committed effort to maintain your PPX. > Happy hacking in OCaml without PPX, Thanks -- Hongbo > >