Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Andrew Conway <arc@sequence.Stanford.EDU>
To: Pierre.Weis@inria.fr, johnm@vlibs.com
Cc: caml-list@pauillac.inria.fr
Subject: Re: Label Names Space - philosophy or implementation?
Date: Tue, 23 Jul 1996 11:13:00 -0700 (PDT)	[thread overview]
Message-ID: <199607231813.LAA21274@vegemite.Stanford.EDU> (raw)


[ 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.






             reply	other threads:[~1996-07-23 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-23 18:13 Andrew Conway [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-07-23  0:40 John Gerard Malecki
1996-07-23 11:36 ` Pierre Weis
1996-07-24  7:37 ` pbrisset
1996-07-24  9:40 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199607231813.LAA21274@vegemite.Stanford.EDU \
    --to=arc@sequence.stanford.edu \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    --cc=johnm@vlibs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox