From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0LIQDtH026876 for ; Fri, 21 Jan 2011 19:26:13 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgAAMNeOU3RVdU0k2dsb2JhbACEE6BKCBUBAQEBCQkKCREEIKMqiT88gheEXC6IWAEBAwWBH4M4dASLHw X-IronPort-AV: E=Sophos;i="4.60,359,1291590000"; d="scan'208";a="87685419" Received: from mail-yw0-f52.google.com ([209.85.213.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-MD5; 21 Jan 2011 19:26:07 +0100 Received: by ywf9 with SMTP id 9so633445ywf.39 for ; Fri, 21 Jan 2011 10:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=QxXROiVqKZy3gBT/3bnAuOlCSUg1X7RxIepcMVswPhA=; b=p8Dl1g20+rwInkuaGxxld0gy2ZOJDofJ/FhU3wBEhaebqXJ25J7xPF1DXImqeNCKMX cKcxpVnsiVJFao8xLHaGsFeaXDtVEGo0umWqIYUpb+AaBuHnOR0mgPPiRplV9Lq7l2ba 3m8YVZc5bRPNxzz+fRSVEmZa/Fuhjp9kTmIZI= 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 :content-type:content-transfer-encoding; b=qCIVy+dy32HCqqyCggkLs3t29RR3wBOuhIaGxc0bwp7JmPFJwb+4TR9XuY6pZBY/UF vlqXrqAMoVAxjx+0oja9lrQKmfniGCJ2CrsHO9BFzZOQxwJ2hpG4yuWCWVeLsYGa1Ig0 OrPI+zx/eqmEk8KSZsV6Dt6yMVemULO0FJwHE= MIME-Version: 1.0 Received: by 10.151.48.16 with SMTP id a16mr1150972ybk.72.1295634366397; Fri, 21 Jan 2011 10:26:06 -0800 (PST) Received: by 10.151.157.5 with HTTP; Fri, 21 Jan 2011 10:26:06 -0800 (PST) In-Reply-To: <20110121153252.GB1729@siouxsie> References: <4D391C4A.9000608@riken.jp> <20110121153252.GB1729@siouxsie> Date: Fri, 21 Jan 2011 20:26:06 +0200 Message-ID: From: dmitry grebeniuk To: caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p0LIQDtH026876 Subject: Re: [Caml-list] writing some code using a function for which only the signature is known Hello. >> let myfunc _myparam1 _myparam2 = notimpl "myfunc" > In the case of non implemented functions I would prefer to see the > raisement of an exception in the code, and not covering it with > a wrapper function. It's a matter of taste. The function with name "notimpl" or "not_implemented" doesn't affect readability, as for me. Only convenience and flexibility (for example, I can change the body of "notimpl" function to make the action depend on the name of undefined function; of course, the last step will be the same: aborting computations, either raising exception or aborting the program with exit()). >>  Notice the first underscores in arguments' names: they >> are here to suppress warnings about unused bindings >> (really, these bindings are unused in this function). > Beginning underlines do suppress warning messages? Yes, if you have this warning enabled. Nice feature: you can enable this warning to catch logic errors in the code, and ignore unused bindings you have specified manually.