From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28619; Tue, 3 Apr 2001 18:52:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 SAA28680 for ; Tue, 3 Apr 2001 18:52:57 +0200 (MET DST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f33GqtP13286 for ; Tue, 3 Apr 2001 18:52:56 +0200 (MET DST) Received: from c198429-a.ross1.pa.home.com by ux9.sp.cs.cmu.edu id aa32222; 3 Apr 2001 12:52 EDT Message-ID: <3AC9FFBD.36DB8DB2@cmu.edu> Date: Tue, 03 Apr 2001 12:52:13 -0400 From: "Eric C. Cooper" X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19pre13 i686) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Future of labels, and ideas for library labelling References: <20010403093527G.garrigue@kurims.kyoto-u.ac.jp> <20010403125314Q.garrigue@kurims.kyoto-u.ac.jp> <20010403105212.A15700@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have been using OCaml for about a year, having "converted" from SML, and have only written a few thousand lines of code in it. I have only used labels when forced to, in order to interface to labltk and lablgtk. The label technology is an impressive piece of work -- it seems like a very clean extension to the core language and clearly increases the expressive power for a certain programming style. But the examples of this style that I have seen, namely Tk and Gtk, seem to have been forced on us by "foreign" packages. Would a "native" library need labels as badly? I would hope not -- it seems that OCaml should allow much nicer interfaces than those in C and C++, but maybe I am just being naive. So far, I see labels not as the "Right Way", but as a necessary evil for dealing with complex real-world APIs. Somewhat like a network firewall -- you need more baggage to deal with the outside, but things can be cleaner and more lightweight in an environment you control. I don't agree that labels are valuable simply to document interfaces. Choosing names for interfaces is a very important part of software engineering, and we already have to do it for types and values. Having to come up with good names (labels) for function parameters makes this harder. Having a lot of ~f, ~x, and ~list labels doesn't add enough clarity, IMO, to compensate for the cluttering up of every function call. I have also noticed a "viral" aspect to labels. If I start using a labelled library, it tends to "infect" the client code that I write (in order to gracefully call (f ~arg) for example). Finally, I don't see continuation of two modes as a bad thing. Rather, it is evidence of a healthy language with real users. Look at gcc, with its "-traditional" and "-ansi" modes. Eric Cooper ecc@cmu.edu ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr