From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA14072 for caml-redistribution@pauillac.inria.fr; Wed, 22 Mar 2000 17:01:38 +0100 (MET) Resent-Message-Id: <200003221601.RAA14072@pauillac.inria.fr> 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 WAA15380 for ; Tue, 21 Mar 2000 22:02:45 +0100 (MET) Received: from localhost.localdomain (krusty43.zip.com.au [61.8.16.43]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id WAA09962 for ; Tue, 21 Mar 2000 22:02:39 +0100 (MET) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id IAA08903; Wed, 22 Mar 2000 08:08:05 +1100 Sender: root@localhost.localdomain Message-ID: <38D7E4B5.AAE8AEBF@maxtal.com.au> Date: Wed, 22 Mar 2000 08:08:05 +1100 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Don Syme CC: "'caml-list@inria.fr'" Subject: Re: additions to standard library? References: <39ADCF833E74D111A2D700805F1951EF180144F3@RED-MSG-06> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Wed, 22 Mar 2000 17:01:38 +0100 Resent-To: caml-redistribution@pauillac.inria.fr Don Syme wrote: > > I've often wondered why languages don't support "extensions" to library > namespaces (and perhaps even to functors). e.g. one could define > > let String.explode s = .... > let String.implode s = ... > let myfun = ... The reason is that it is hard to localise these changes. It isn't acceptable to extend the actual module, since two clients could provide conflicting "extensions". This would break the Open/Closed principle [Meyer, OOSC] -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net