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 271D182355 for ; Thu, 4 Jan 2018 17:51:02 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=echowuhao@gmail.com; spf=Pass smtp.mailfrom=echowuhao@gmail.com; spf=None smtp.helo=postmaster@mail-ot0-f180.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of echowuhao@gmail.com) identity=pra; client-ip=74.125.82.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="echowuhao@gmail.com"; x-sender="echowuhao@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of echowuhao@gmail.com designates 74.125.82.180 as permitted sender) identity=mailfrom; client-ip=74.125.82.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="echowuhao@gmail.com"; x-sender="echowuhao@gmail.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@mail-ot0-f180.google.com) identity=helo; client-ip=74.125.82.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="echowuhao@gmail.com"; x-sender="postmaster@mail-ot0-f180.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AUDq8jxYOQHXlVNE+gqknGUP/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZr8+6bnLW6fgltlLVR4KTs6sC17KP9fi4EUU7or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRp?= =?us-ascii?q?OOv1BpTSj8Oq3Oyu5pHfeQpFiCagbb9oMBm6sRjau9ULj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?I14XkEFcryAIzDQZ+wgLWG9Ci+F5xSIGtBDwbfQj/Ta4yYVqJUO2qpKch7n2lB?= =?us-ascii?q?DOD5Rg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DdAQAjW05ahrRSfUpcHAEBAQQBAQoBA?= =?us-ascii?q?YNlP3QUEweEAGNWl3OCAQKXPIIBCiODOoFeAoQtB0MUAQEBAQEBAQEBARIBAQE?= =?us-ascii?q?ICwsIKC+COCQBgkcBAgIBIwQZARsdAQMBCwYFBAcDLQcCAiEBAREBBQEcBhOKF?= =?us-ascii?q?QEDDQgQpTBAjBGBbRgFARyDCwWDZgoZJw1ZghcBAQEBAQEEAQEBAQEBARkCBhK?= =?us-ascii?q?EAYIShm2CazkMgTZlgmqCZQWTN4YziS89iAaINYUAghdliUaHQ40xPkKISxQFI?= =?us-ascii?q?IEXDyeBcW9SMoF4CYISKh8lgW8gNwGJEgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0DdAQAjW05ahrRSfUpcHAEBAQQBAQoBAYNlP3QUEweEAGN?= =?us-ascii?q?Wl3OCAQKXPIIBCiODOoFeAoQtB0MUAQEBAQEBAQEBARIBAQEICwsIKC+COCQBg?= =?us-ascii?q?kcBAgIBIwQZARsdAQMBCwYFBAcDLQcCAiEBAREBBQEcBhOKFQEDDQgQpTBAjBG?= =?us-ascii?q?BbRgFARyDCwWDZgoZJw1ZghcBAQEBAQEEAQEBAQEBARkCBhKEAYIShm2CazkMg?= =?us-ascii?q?TZlgmqCZQWTN4YziS89iAaINYUAghdliUaHQ40xPkKISxQFIIEXDyeBcW9SMoF?= =?us-ascii?q?4CYISKh8lgW8gNwGJEgEBAQ?= X-IronPort-AV: E=Sophos;i="5.46,314,1511823600"; d="scan'208,217";a="307690246" Received: from mail-ot0-f180.google.com ([74.125.82.180]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Jan 2018 17:50:59 +0100 Received: by mail-ot0-f180.google.com with SMTP id q39so1785578otb.8 for ; Thu, 04 Jan 2018 08:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bQzjXw7NHn3zp4onCmFc4fvoWjAU2fRj7zsow2C1mPA=; b=SN9g6NOvJIqAjhoGA4GIq5jF5lpdAb9GsZq5dVuGVo+0gWzYt6RLInVcGap9RBI0Ci B5gwvoASK3ginjNPdEgLQ4nLrs/DrgPlCUlwkTznoxjhBDtTQ5eiLIp5hng/tP+nORzd lcJJcxIFdmuJSxs/XT96IdFScTYUzkLr9P34nycemNKPMN21fHWn3hRPvnzD/AtrgzVc 3zjJJYoKFfGlS3YNmhmTxlal3czhxSHQrDO4XEsH94LXctb/2B05OoEINki8BGCf97tB zElP+Hy7maKz/h6NlCJo//4/H2ac5ppWQojZ1RJcWelLJiQFaRv6ITO7VzA4vU6KjRhx eQ/Q== 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=bQzjXw7NHn3zp4onCmFc4fvoWjAU2fRj7zsow2C1mPA=; b=A8Fczpm4FOcMcnjG2dPqz7Xa6mEnpLUmO603vIn7KGRILsR4BfoeJE9AQ+LVr2lnpG lMjXcVniJJmtkekjGyTy3nAhVbkyWz+cGe2pM8hr4R/kaDOR3lXoWy08WPDJpcqvB6qK DolnRx+gj+sq+Gm/A1b7poZ0faJy6SH1g7LCTSCliNeMvOU1TJo+LY8UQJZLY4APa3SM 4CiL69q+SMXoN3NB8lBZ1eQuiwUzOT45s1P+yc3Hr1CJOruKScG4Vd6xGkQQXVZFZqzP FsAb1cTPYZTqvCYwFhiiWAPrFBgWQvIi9OpoNzlNQ5r17ag/S/V8iaLBUa1YqZLvvJVE c2ZQ== X-Gm-Message-State: AKwxytfQZw2Glz2RcyXWfsyMnY9aTim/GXmxHmx3VtKmLRpcU43JWHqi cJjrsiG27zS0uA4ZMyQotEAK9gwfMzi9JmOjQ1PgVw== X-Google-Smtp-Source: ACJfBot2h01j2xe20sqnq5f5OExAi1kyDlRFKl51S/K7rlErhnK4xGCmiEIHySuR72Gkwng+/TH85u3J3reg1xu1Cwo= X-Received: by 10.157.83.134 with SMTP id w6mr120975otg.312.1515084657879; Thu, 04 Jan 2018 08:50:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.176.4 with HTTP; Thu, 4 Jan 2018 08:50:57 -0800 (PST) In-Reply-To: References: From: Hao Wu Date: Thu, 4 Jan 2018 08:50:57 -0800 Message-ID: To: Evgeny Roubinchtein Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary="f403043e4f84d671660561f622e0" Subject: Re: [Caml-list] A question about "8.9 First-class modules -> Advanced examples" section of the reference manual --f403043e4f84d671660561f622e0 Content-Type: text/plain; charset="UTF-8" RWO has a chapter if you have not read it. https://realworldocaml.org/v1/en/html/first-class-modules.html On Fri, Dec 22, 2017 at 1:13 AM, Evgeny Roubinchtein wrote: > Dear OCaml users and developers, > > I find the "Advanced examples" sub-section of the "First-class modules" > section in the reference manual (http://caml.inria.fr/pub/ > docs/manual-ocaml/extn.html#sec244) to be a bit short on motivation. > > I appreciate that it may be, "possible to parametrize some code over the > implementation of a module without using a functor", but I am having > trouble imagining why one would want to do such a thing. Also, the > "without using a functor" part comes across (to me) as a bit hollow, given > that the example provided _does_ in fact use [Set.Make] functor: it just > hides the invocation of that functor inside the definition of the > [make_set] function, so it reads (to me) like just a round-about way to > invoke the [Set.Make] functor. > > Also, was a description of first-class modules in OCaml published in > either a paper or a thesis, or perhaps a journal article? > > Thank you in advance! > > -- > Best, > Evgeny ("Zhenya") > --f403043e4f84d671660561f622e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
RWO has a chapter if you have not read it.=C2=A0

= On Fri, Dec 22, 2017 at 1:13 AM, Evgeny Roubinchtein <= zhenya1007@gmail.= com> wrote:
Dear OCaml users and developers,

I find = the "Advanced examples" sub-section of the "First-class modu= les" section in the reference manual (http://caml.inria= .fr/pub/docs/manual-ocaml/extn.html#sec244) to be a bit short= on motivation.=C2=A0

I appreciate that it ma= y be, "possible to parametrize some code over the implementation of a module without using a functor", but I am having t= rouble imagining why one would want to do such a thing.=C2=A0 Also, the &qu= ot;without using a functor" part comes across (to me) as a bit hollow,= given that the example provided _does_ in fact use [Set.Make] functor: it = just hides the invocation of that functor inside the definition of the [mak= e_set] function, so it reads (to me) like just a round-about way to invoke = the [Set.Make] functor.

Also, was a descriptio= n of first-class modules in OCaml published in either a paper or a thesis, = or perhaps a journal article?

Thank you in advance!

--
Best,
Evgeny ("Zhenya&quo= t;)

--f403043e4f84d671660561f622e0--