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 95C037EF5E for ; Fri, 15 Jul 2016 21:44:11 +0200 (CEST) IronPort-PHdr: 9a23:aFpzEhHk8Q3TRU9qpsa7yJ1GYnF86YWxBRYc798ds5kLTJ75oMSwAkXT6L1XgUPTWs2DsrQf2rKQ7/yrADdcqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ3pzxi7z5osaPKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cYk7sb+sVBSaT3ebgjBfwdVWx+cjN92Mq+khLKSA/Hw3IdVmQQnVJsAhPZpEXxV5L19y/7rfZV2S+APMSwQ6piChq46KI+aBLuhD0GNHYT92bSwphwgaRXuhOijwB424nVJpmSM+M4daTYK4BJDVFdV9pcAnQSSri3aJECWq9YZb5V Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=hendrik@topoi.pooq.com; spf=None smtp.mailfrom=hendrik@topoi.pooq.com; spf=None smtp.helo=postmaster@april.topoi.pooq.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=pra; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=mailfrom; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@april.topoi.pooq.com) identity=helo; client-ip=69.165.131.134; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="postmaster@april.topoi.pooq.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ANBgCpO4lX/4aDpUVdhF4Bgyewd4UJgXuGGgKBaRIBAQEBAQEBAWQngjIEARIBghMBBTpPCxgJJQ8FGDGIQ786AQEBBwIBJIp3h2yCLwWOCIsZh0WHDApnjk6QGyULJIQPIIgqAQEB X-IPAS-Result: A0ANBgCpO4lX/4aDpUVdhF4Bgyewd4UJgXuGGgKBaRIBAQEBAQEBAWQngjIEARIBghMBBTpPCxgJJQ8FGDGIQ786AQEBBwIBJIp3h2yCLwWOCIsZh0WHDApnjk6QGyULJIQPIIgqAQEB X-IronPort-AV: E=Sophos;i="5.28,369,1464645600"; d="scan'208";a="184940760" Received: from topoi.pooq.com (HELO april.topoi.pooq.com) ([69.165.131.134]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Jul 2016 21:44:09 +0200 Received: by april.topoi.pooq.com (Postfix, from userid 1001) id 5BAB2C20E7; Fri, 15 Jul 2016 15:44:07 -0400 (EDT) Date: Fri, 15 Jul 2016 15:44:07 -0400 From: Hendrik Boom To: Ocaml Mailing List Message-ID: <20160715194407.GB1998@topoi.pooq.com> References: <001701d1daa2$30f7ac30$92e70490$@metastack.com> <1468179914.25014.89.camel@e130.lan.sumadev.de> <20160714090300.GB21053@frosties> <002601d1de7e$9f5776d0$de066470$@metastack.com> <20160715161308.GB30333@topoi.pooq.com> <0017d57b-7316-c5a8-87fc-db297d8fbb20@lexifi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0017d57b-7316-c5a8-87fc-db297d8fbb20@lexifi.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [Caml-list] Warnings opening modules (was: why is building ocaml hard?) On Fri, Jul 15, 2016 at 08:50:25PM +0200, Alain Frisch wrote: > On 15/07/2016 18:57, Yotam Barnoy wrote: > >The problem seems to stem from the fact that the same open statements > >which we use to import code (and which are available in every > >language) are also used as part of OCaml's super-flexible module > >system. This makes it hard to come up with easy, simple shortcuts for > >functionality available in other languages, because it needs to fit in > >the far more complex general module language. > > There would really be no difficulty to allow specifying which components to > bring in scope in an "open" statement. One just need to decide if it is a > good idea from a language design point of view, and then agree on / fight > over a syntax. (One needs to distinguish of course between various kinds of > components.) Modula 3 does it this way, and allows you to rename on import. It also allows you to just import an emtire module, but then you have to mention the name of the module every time you use the something it provides. It has no promiscuous 'give me whatever'. It works. And it's usually easy to find where something is defined. Except for methids of object types. Identifying the particular function being called then depends on run-time information. That's inherent to inheritance and overriding. -- hendrik