From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id VAA16231 for caml-redistribution; Tue, 23 Jul 1996 21:22:32 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id UAA14337 for ; Tue, 23 Jul 1996 20:13:07 +0200 Received: from vegemite.Stanford.EDU (vegemite.Stanford.EDU [171.65.76.158]) by nez-perce.inria.fr (8.7.1/8.7.1) with ESMTP id UAA00762 for ; Tue, 23 Jul 1996 20:13:02 +0200 (MET DST) Received: (arc@localhost) by vegemite.Stanford.EDU (8.7.1/8.6.4) id LAA21274; Tue, 23 Jul 1996 11:13:00 -0700 (PDT) Date: Tue, 23 Jul 1996 11:13:00 -0700 (PDT) From: Andrew Conway Message-Id: <199607231813.LAA21274@vegemite.Stanford.EDU> To: Pierre.Weis@inria.fr, johnm@vlibs.com Subject: Re: Label Names Space - philosophy or implementation? Cc: caml-list@pauillac.inria.fr Sender: weis [ Francais: Il y a quelques choses (dessous) que je n'aime pas avec ocaml, mais, les autres langues ont des plus grands problemes. ] > > A co-worker has (vehemently) pointed out to me that record label names I agree with the vehemently part. This is an annoyance which I have frequently run into. > Its a common habit to prefix the labels with the name of the type: That is an ugly hack to work around a problem with the language. Don't get me wrong, I think that, all in all, ocaml is my favourite language, and I am very greatful to you for making it. The fact that something is the best doesn't mean that it couldn't be better, however, so it is about time for me to reorder my current list of annoyances. Below is a list of the common mistakes I make in CAML that I don't make in other languages, or annoyances that I have with CAML. The list is ordered, most annoying coming first. Many of these have been mentioned by other people before; I am just adding support. 1) Writing "+" instead of "+." [ I know this is effectively intractable, and I am willing to put up with it. It is, however, my major source of type mistakes when I am doing numeric work. ] 2) Putting an extra semicolon before a "done" or "end" statement [ This is especially annoying when adding a line after the last line, such as a debugging printf statement, or re-ordering lines. ] 3) I have written my own library of (amongst other things) standard list and array manipulation routines, in modules Mylist and Myarray. If I want a function such as map2 on lists, I type in List.map2. If I want an analagous function on arrays, I do Myarray.map2. Frequently I mistakenly do Array.map2 instead, remembering that it is defined for arrays, and since it is in the standard library for List, it is also in the standard library for arrays. I appreciate the reasons why these are not symmetyric, but it would be nice if it were possible to merge modules, so that I could refer to my own libraries through the List or Array modules. 4) Using a record label twice 5) Annoyance: one can make a custon toplevel, linking in custom code to manipulate ones own datatypes. This is really useful. However, one cannot link in a command to automatically use a prettyprinter, and this command has to be done by hand. Having a startup script would be really useful. 6) There is no deep copy. 7) One cannot use ocamlopt compiled routines in camltop, though one can use C routines. I realise that the memory allocation register usage makes this difficult. On the other hand, a few days ago, I was considering rewriting some matrix manipulation routines in C instead of ocaml, so that I could run them at a reasonable speed under ocamltop, even though they ran acceptably quickly when compiled by ocamlopt. Then it suddenly dawned on me that it seemed a little silly to convert something FROM ocaml to make it easier to work WITH ocaml. Anyway, I should again say that these are, of course, just annoyances, and I still really like the language. However, having you aware that they are frustrations can't hurt. Thanks again, Andrew.