From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 98F18BC57 for ; Thu, 27 May 2010 10:50:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgEABfP/UvRVaE0gWdsb2JhbACRW4w1CBUBARYiIq9jggGFTy6ITwEBAwWFDgSDPQ X-IronPort-AV: E=Sophos;i="4.53,310,1272837600"; d="scan'208";a="51917061" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 May 2010 10:50:42 +0200 Received: by fxm8 with SMTP id 8so3063545fxm.39 for ; Thu, 27 May 2010 01:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=k4v4ii25pGX0xQUWxUrTPcr6GQeVrJKvmY0+gPI2BB8=; b=DwLBmlF/7tb7Q6SawMKuOMfZ9lHYv7hND6EFlhteJJRNqFiYz5KzFXgBJDTegmw3wD yBgVDtRm03hsk+Zl42PspxMsMuyCSHAxghXmVuS7zHxCoaaC/qhDUk2ybNdgylsji4bx qu9SxbBoRcYvI9Lup+4Fl+LbS2yCbYq9ul5GA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=HA1dyTfS4NF/CX5fS0/TjmorMLXERw06+U/Iz6+QFBGdfYbRRTcESDAr+sCkeq2/HV GtRyYYtCOBbMbY/YM2dDikhANSqwiQC0/DwafYN3ShgXuXdLjrx2M45+/8EG6KZunWkH epW1GpOV1Z/bfTJbw6QAvllJbkv8L9PWCG3Jo= MIME-Version: 1.0 Received: by 10.223.19.87 with SMTP id z23mr8872109faa.7.1274950241998; Thu, 27 May 2010 01:50:41 -0700 (PDT) Received: by 10.223.115.134 with HTTP; Thu, 27 May 2010 01:50:41 -0700 (PDT) In-Reply-To: <4BFE2881.1070705@imag.fr> References: <956439.81564.qm@web111506.mail.gq1.yahoo.com> <4BFE2881.1070705@imag.fr> Date: Thu, 27 May 2010 11:50:41 +0300 Message-ID: Subject: Re: [Caml-list] Static exception analysis or alternative to using exceptions From: Eray Ozkural To: Florent Ouchet Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; eray:01 ozkural:01 nesting:01 eray:01 ozkural:01 bilkent:01 wrote:01 exception:01 exception:01 caml-list:01 exceptions:01 imag:02 groups:02 checking:02 static:03 On Thu, May 27, 2010 at 11:08 AM, Florent Ouchet wrote: > Hello, > > Same here, specially to avoid the Not_found exception. > The optional return values gives the oportunity to have a clear view of what > is being done if the result is not available. That depends on the code, I think. In some cases the exception may arise from deep in the code, and it would make sense not to bother with a lot of type overhead for many levels of nesting and function calling. But if all you are doing is checking the success of a function, I suppose option types will be more efficient. Best, -- Eray Ozkural, PhD candidate. Comp. Sci. Dept., Bilkent University, Ankara http://groups.yahoo.com/group/ai-philosophy http://myspace.com/arizanesil http://myspace.com/malfunct