Version franēaise
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Annoying behaviour of OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Annoying behaviour of OCaml
Zitat von David Thomas <>:

> --- Oliver Bandel <> wrote:
> > Even if this would be the case, not what we expect
> > is of importance, but what the documentation says.
> > If there's a difference between documentation and
> > bahaviour, then there is a bug (in the
> documentation,
> > or in the implementation, or both).
> I disagree that expectations are of no importance.
> Principle of least surprise and all that...

Principle of least surprise is fine.
But it depends on the view of the one
who is surprised or not.

When I start to use Blender for example,
with the principle of least surprise,
I will be very surprised not to have
the typical Windows-GUI (and KDE and such stuff)
when using it.
I could blame the developers for using completely
different ways of GUI-design, writing hate-mails to them,
why they didn't used the menues that every person expects,
when using a GUI-based application, ...
...or I could try to learn how to use and see, that
it's the best GUI (IMHO), that was ever invented.

Or there are expectations to three mouse-buttons and
for a long time the expectation was, that only the
left button has to be used; since a while the right one
also became popular, and later then the middle button.

But some years ago I wanted to provide a GUI as frontend to
sendfile; I used left button for "add file", right
for "remove file" (or other way around, don't know).
The sendmail developer than said, this is against
the expectations, so he would not encourage it.

To go that way every time IMHO is nonsesne...
...expectations can (and WILL) be changed by the
programs that people use. Habituating to them
means changing the expectations.

Expectations are based on habits.
And habits can change (even if sometimes slowly).

OK, this is not OCaml-discussion, but you started an abstract
discussion, so I can use the arguments on other software too.

> Violation
> of expectations is a bug not in documentation or
> implementation, but design.  That said, there may very
> well be overriding concerns that force us to introduce
> behavior contrary to expectations in certain instances
> - it's one guideline of many.

So, OK, then these "overridings" are at work here. ;-)

When one knows them, this is OK, IMHO.
The perfect world can possibly be found at

I'm now very habituated to OCaml. And it's "imperfection"
(compared to Haskell) is a plus for me, because I like the
multi-paradigm way.

I also have moaned about non-functional strings
years ago (when starting with OCaml), but now my expectations have
been ocamlized ;-) and today it's ok for me. There are good reasons for
them and I could go to the Haskell-universe if I don't want them.
And I didn't had problems with the imparative strings so far,
so my experiences confirmed the design of OCaml.
This might be different for other people, depending on needs and
expectations ;-) (needs might also be habituated).

And if compare does not fit the needs, one can write special
compare-functions. I'm sure, in OCaml, this can be done with
a hand of lines of Code.