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 8B3E27F8FE for ; Mon, 2 Jun 2014 10:43:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=mailfrom; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.12; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMBADE4jFPU4xEMnGdsb2JhbABZxwUBgRIWDgEBAQEBBg0JCRQogiUBAQQBMgFLCwshJQ8FKIhhAQwMzVUfhjwXjlkWgxWBFQEDmX+GVxKPfw X-IPAS-Result: AoMBADE4jFPU4xEMnGdsb2JhbABZxwUBgRIWDgEBAQEBBg0JCRQogiUBAQQBMgFLCwshJQ8FKIhhAQwMzVUfhjwXjlkWgxWBFQEDmX+GVxKPfw X-IronPort-AV: E=Sophos;i="4.98,955,1392159600"; d="scan'208";a="64987948" Received: from mout.web.de ([212.227.17.12]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Jun 2014 10:43:18 +0200 Received: from frosties.localnet ([78.43.112.61]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MFL6u-1X3R3J0bVU-00EKmh for ; Mon, 02 Jun 2014 10:43:17 +0200 Received: from mrvn by frosties.localnet with local (Exim 4.82) (envelope-from ) id 1WrNpr-00008N-Pm for caml-list@inria.fr; Mon, 02 Jun 2014 10:43:15 +0200 Date: Mon, 2 Jun 2014 10:43:15 +0200 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20140602084315.GC32010@frosties> References: <53835610.9050609@inria.fr> <53B801AD6F5B4BFBA0DA2A69D8775497@erratique.ch> <8738frjg8u.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:HeN+UjYDYfeG1Mm1d8jh+RLFnlhdzAxJea8tSI1QseaFbksIeUJ Hc8OLcyQtZfG6YPQoQL7bxzjdWDj9h3rIRPFSfgAR/WUeEpsNn9RguXrZ9VA/bcQsiG/huZ 1ZTcSrjnQro4YR5DL0cKw61MtzT5QRtgx+rjhgPSDfRcx0l12IvKBvdbHps/6awPY4/mxnv UysH1J/OfemgicUkdmgiw== Subject: Re: [Caml-list] Uncaught exceptions in function type. > Le vendredi, 30 mai 2014 à 20:03, Florian Weimer a écrit : > > > * Daniel Bünzli: > > > > > * Non-exceptional errors, errors that the programmer will have to > > > handle (e.g. failing to connect a socket), for that do not use a > > > custom exception but use variants or options types. > > > > In some cases this introduces allocations even for the success case, > > and exception-based design avoids that. Doesn't success with option types always introduce an allocation? Some x is a block and wants to be created. Worse if you constantly unpack and repack the option.