From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA22271 for caml-redistribution; Mon, 22 Feb 1999 18:09:03 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA16787 for ; Mon, 22 Feb 1999 16:06:45 +0100 (MET) Received: from linc.cis.upenn.edu (LINC.CIS.UPENN.EDU [158.130.12.3]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id QAA10034; Mon, 22 Feb 1999 16:06:42 +0100 (MET) Received: from codex.cis.upenn.edu (CODEX.CIS.UPENN.EDU [158.130.6.15]) by linc.cis.upenn.edu (8.8.5/8.8.5) with ESMTP id KAA13058; Mon, 22 Feb 1999 10:06:41 -0500 (EST) Received: (from mwh@localhost) by codex.cis.upenn.edu (8.8.5/8.8.5) id KAA23257; Mon, 22 Feb 1999 10:06:41 -0500 (EST) From: Michael Hicks Message-Id: <199902221506.KAA23257@codex.cis.upenn.edu> Subject: Re: Warnings in ocaml To: Xavier.Leroy@inria.fr (Xavier Leroy) Date: Mon, 22 Feb 1999 10:06:40 -0500 (EST) Cc: caml-list@inria.fr In-Reply-To: <19990222133655.46186@pauillac.inria.fr> from "Xavier Leroy" at Feb 22, 99 01:36:55 pm X-Mailer: ELM [version 2.4 PL23-upenn3.1] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > > I copied from SML and defined a procedure "ignore": > > so now I would write: > > ignore (f x y); ... > > I was considering adding this to the standard library, implemented in > such a way that no function call actually takes place. It seems to > strike a reasonable balance between the safety of the warning and the > inconvenience of writing "let _ = ..." This is a nit, but I've noticed that for the bytecode compiler that let _ = foo() in () generates more instructions than for foo(); () In particular, there is an extra "push" instruction (presumably for the binding to _) in the former. Is there any way to avoid this instruction given that we know the binding is not going to really occur? Mike -- Michael Hicks Ph.D. Candidate, the University of Pennsylvania http://www.cis.upenn.edu/~mwh mailto://mwh@dsl.cis.upenn.edu "I worked with an individual who plugged his power strip back into itself and for the life of him could not understand why his computer would not turn on."