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 LAA29090 for caml-redistribution; Mon, 11 May 1998 11:29:48 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA29479 for ; Fri, 8 May 1998 22:52:52 +0200 (MET DST) Received: from jurancon.inria.fr (jurancon.inria.fr [128.93.8.74]) by concorde.inria.fr (8.8.7/8.8.5) with ESMTP id WAA27188 for ; Fri, 8 May 1998 22:52:50 +0200 (MET DST) Received: (from delahaye@localhost) by jurancon.inria.fr (8.7.6/8.7.3) id WAA02976 for caml-list@inria.fr; Fri, 8 May 1998 22:52:50 +0200 (MET DST) From: David Delahaye Message-Id: <199805082052.WAA02976@jurancon.inria.fr> Subject: Filename.chop_suffix To: caml-list@inria.fr Date: Fri, 8 May 1998 22:52:50 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis Bonsoir, Je suis tombe, par hasard, sur une phrase du manuel d'ocaml en ligne qui m'a un peu interpelle (dans Filename): > val chop_suffix : string -> string -> string > > chop_suffix name suff removes the suffix suff from the filename name. The > behavior is undefined if name does not end with the suffix suff. Cela ressemble fortement a un trou semantique. Pourquoi ne pas lever tout simplement une exception qui caracteriserait entierement le comportement de cette fonction? Amicalement. David. =============================================================================== David Delahaye : David.Delahaye@inria.fr : The Coq Project : Proofs : INRIA-Rocquencourt Domaine de Voluceau BP105 78153 Le Chesnay Cedex FRANCE : (33)-(0)1 39 63 57 53 : (33)-(0)1 39 63 56 84 : http://pauillac.inria.fr/~delahaye =============================================================================== [If you have time to waste, you can have a look on my proof that all the real number are positive. Given x in R: x^2>=0 (well-known result) (x^2)^(1/2)>=(0)^(1/2) (use of power on each member) x^(2*1/2)>=0 (use of the propertie: (x^n)^m=x^(n*m) x^1>=0 (very easy simplification) x>=0 (great!)]