From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fded8d14c74b14e5 X-Google-Attributes: gid103376,public From: Jon S Anthony Subject: Re: Looking for Ada Technique Name and References Date: 2000/02/22 Message-ID: <38B33F23.4784@synquiry.com>#1/1 X-Deja-AN: 588648931 Content-Transfer-Encoding: 7bit References: <88kegp$iso$1@coward.ks.cc.utah.edu> <88kh6q$j4j$1@coward.ks.cc.utah.edu> <88s90i$8mi$1@ns3.arlut.utexas.edu> <88svc0$nkj$1@coward.ks.cc.utah.edu> <38b32dca@eeyore.callnetuk.com> Content-Type: text/plain; charset=us-ascii X-Trace: client 951271240 38.151.18.1 (Tue, 22 Feb 2000 21:00:40 EST) MIME-Version: 1.0 NNTP-Posting-Date: Tue, 22 Feb 2000 21:00:40 EST Newsgroups: comp.lang.ada Date: 2000-02-22T00:00:00+00:00 List-Id: Nick Roberts wrote: > > "John Halleck" wrote in message > news:88svc0$nkj$1@coward.ks.cc.utah.edu... > > ... > > This trick is *** NOT *** supported by most languages. > > I don't think I've ever encountered any language that allows a > function composition itself to be specially defined. Any language that directly supports higher order functions supports such definitions (any functional language, e.g., Common Lisp or Scheme). > A classic case is where a 'mod' is done between two operands just > after (or before) a divide is done between the same operands. Many > compilers will optimise this into a single machine instruction > (which computes both the quotient and the modulus in one go). What has this to do with function composition? Sounds like a typical optimization arising out of data flow analysis. /Jon -- Jon Anthony Synquiry Technologies, Ltd. Belmont, MA 02478, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari