caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael Hicks <mwh@dsl.cis.upenn.edu>
To: Xavier.Leroy@inria.fr (Xavier Leroy)
Cc: caml-list@inria.fr
Subject: Re: Warnings in ocaml
Date: Mon, 22 Feb 1999 10:06:40 -0500 (EST)	[thread overview]
Message-ID: <199902221506.KAA23257@codex.cis.upenn.edu> (raw)
In-Reply-To: <19990222133655.46186@pauillac.inria.fr> from "Xavier Leroy" at Feb 22, 99 01:36:55 pm


> > 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."




  parent reply	other threads:[~1999-02-22 17:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-22  9:55 Frank A. Christoph
1999-02-22 12:36 ` Xavier Leroy
1999-02-22 13:24   ` Anton Moscal
1999-02-22 15:06   ` Michael Hicks [this message]
1999-02-22 18:33 ` Ching-Tsun Chou
  -- strict thread matches above, loose matches on Subject: below --
1999-02-22 17:25 Don Syme
1999-02-22 18:16 ` Pierre Weis
1999-02-22 14:56 Andrew Kay
1999-02-22 13:45 Andrew Kay
1999-02-19 12:30 Jacques GARRIGUE
1999-02-19 18:32 ` Pierre Weis
1999-02-20 10:45   ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199902221506.KAA23257@codex.cis.upenn.edu \
    --to=mwh@dsl.cis.upenn.edu \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).