caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Max Skaller <skaller@maxtal.com.au>
To: "Krishnaswami, Neel" <neelk@cswcasa.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] A G'Caml question" + additional info
Date: Sat, 14 Jul 2001 12:04:50 +1000	[thread overview]
Message-ID: <3B4FA8C2.57FCDD80@maxtal.com.au> (raw)
In-Reply-To: <B1E4D3274D57D411BE8400D0B783FF322E8656@exchange1.cswv.com>

"Krishnaswami, Neel" wrote:

> Permit me to disagree. I find nearly all of OCaml's features highly
> useful and orthogonal, and I am only working on medium size projects.

I don't find that is entirely true.
First, there is quite a bit of sugar, such as fun/function/match,
if then else vs. matching.

Then, there are duplicated facilities: tuples and records,
standard variants and polymorphic ones. Then classes and modules
overlap.
Oh, and labelled arguments or not. To currify a function or use
a tuple .

Some syntax cannot be used as the 
basic grammar would suggest, and the constraints aren't documented.
For example, you can write:

	let x,y,z = (1,2,3) 
	let Some x = Some 1
	let (Some x) as y = Some 1

but not

	let (Some x) when true = Some 1

I'd give examples from the module system, if only I understood
how to use it properly.

In classes, you can write:

	x <- y

for 'assignment', but you have to write

	x := y

for a reference in ordinary code.

Many library components have both a functorial and
polymorphic interface. There are two versions
of some libraries (Unix, ThreadUnix). Some of the libraries
seem deficient (Str).

Then, there is a duplication of tools (native code
and bytecode compilers), label or standard mode.

The interaction of all these features with the type
system, particularly type inference, makes for some
really daunting error messages.

I'm NOT complaining, just disagreeing.
In my current project, I've been sticking to the basic
feature set. But I'm stronly tempted to switch to polymorphic
variants, because they'd provide much better typing for
my application. But I'm scared that I won't be able to 
understand the error messages, and quite concerned
that there's no way to catch spelling mistakes.
[Something which declared the variant names would be useful]
Switching over, to an _isomorphic_ program -- a mechanical
task -- will requires an almost complete rewrite, by hand.

There's no question that I have a difficult choice
between two non-orthogonal features. 
I'm glad to have the choice -- its much better than being stuck
in C++ without any representation of sums :-)

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-07-14  2:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-11 22:23 Krishnaswami, Neel
2001-07-11 22:47 ` Brian Rogoff
2001-07-12  9:37 ` Markus Mottl
2001-07-14  2:04 ` John Max Skaller [this message]
2001-07-14  3:00   ` Alexander V. Voinov
2001-07-14 15:00     ` John Max Skaller
2001-07-11 23:10 Krishnaswami, Neel
2001-07-12  0:08 ` Brian Rogoff
2001-07-12 21:30 Krishnaswami, Neel
2001-07-13  9:34 ` Markus Mottl
2001-07-13 13:12 Krishnaswami, Neel
2001-07-13 13:35 ` Markus Mottl

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=3B4FA8C2.57FCDD80@maxtal.com.au \
    --to=skaller@maxtal.com.au \
    --cc=caml-list@inria.fr \
    --cc=neelk@cswcasa.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;
as well as URLs for NNTP newsgroup(s).