English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
On bashing the OCaml-car...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-27 (22:29)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] On bashing the OCaml-car...
Zitat von skaller <skaller@users.sourceforge.net>:

> On Mon, 2007-08-27 at 12:41 +0200, Oliver Bandel wrote:
> > Yes. So, why do you bothering?!
> > Please, no more OCaml-bashing.
> I am not Ocaml bashing: I'm analysing the consequences
> of certain choices. I can write a lot of different
> languages, Ocaml is only one. I also designed my own,
> similar in some respects to Ocaml, and made some different
> choices with different consequences.

My appreciation for this.

> My point is simply that the OP is right: Ocaml has a rather
> convoluted and complex syntax that is hard to grasp.

It has a steep learning curve, yes.
At least for non-FP-programmers.

But the most things in OCaml have their advantages,
which sometimes - from a certain perspective - will not be seen!

Some people say, it's ugly, because it's not purely functional.
Other people appreciate that it is not dogmatic and offers
many paradigms. You and others dislike the if-then-else way of OCaml,
but I like it.

Before I had seen that only one single expression
is allowed in the if-then-else I also was somehow confused.
But in the manual it's mentioned. And after I was used to it,
I also have seen the advantages. So, what I mean here, is: something that
might look evil or stupid, from a different viewpoint is excellent!
And OCaml as a multiparadigm language offers many ways to look at things
For example OOP: OO sometimes is a good choice, sometimes it's annoying,
if you onyl want to have one object and not use  more objects of a certain kind.
So defining a class for one object? OCaml offers immediate objects.
Others might argue this is nonsense, or is not compatible with
"the correct way of <your_favourite_paradigm_or_style>".
But it brings good possibilities.

And that's what I mean: if you have a different taste,
and insist on your viewpoint you will have to look at some
properties in the same way, and in a certain way.

If you have found your absolutely perfect language
(you are the founder / have found it /created it),
then felix might be perfect?
Or would you write it differently today?

> Many people think functional programming is hard to learn,
> contrarily, I think it is quite easy and takes about 1 hour,
> since any programmer already knows it (though perhaps not
> indepth techniques). When I first started using Ocaml I had
> no problem with the functional programming aspect .. it was the
> syntax I had problems with .. and clearly still do.

I'm not quite sure, if it was the syntax also,
but as far as I remember, as FP was new to me, this
also was not so easy. I didn't found scheme much easier
to learn, even if the syntax was easier.

But maybe I have a different view, coming from mostly C and Perl.
(But compared to Haskell, I found some aspects of OCaml much easier!)

> For example functors are a simple idea I understand from basic
> category theory ..

Fine if you know this.
My appreciation for what you know.

But the syntax is a kind of taste (and perspective).

> but simple math I can use to express the relations
> between various algebraic data structures totally elude me in Ocaml.


There are other languages, which would fit your needs better, I would think.

> I'm not the only one .. only the true masters even come close to
> understanding why,

Possibly you can explain it.
Maybe there are already languages that make it possible
the way you like it.

> in fact, it doesn't work without considerable
> extra trickery (I have seen some of these solutions .. there
> is no way in the world I could have come up with them).

? explain this, please.

What I can say is: if you like a language, use it.
If you dislike the language: don't use it.
You should never use a language that you use
voluntarily, and at the sanme moment complain about it's

I don't like Java, so I don't use it.
There was a time, when I preferred Perl for nearly everything,
so I used it. Now I would prefer OCaml, so it's my first choice.
when I needed C, I have used it (or when I need it today, I will use it),
but don't complain about it's deficiencies.

Sometimes things I find out might be not so good.
It's OK to mention it. But if it's too bad, it would be time to leave it
alone. The maybe it would be time to write a new language.

But using a language and always read mails about the uglyness odes not make
sense IMHO.

And it make sense to ask for features of OCaml,
but to insist that OCaml should be rewritten by the OCaml-core team
is overconfident. They make their job, we ours.
So, we can ask for features, but we don't give the core-team the commands.

Sometimes, when I read the mails here, I think, people would
like to be the chief of the OCaml core-team.

IMHO we can be happy tho have such a good language like OCaml.
Look at M$. A company that I really dislike, but look,
what they have done: they didn't complained about OCaml,
they created F#.
So, appreciation for M$, the company I dislike, because they
made it in a very constructive way.


P.S.: If the Extlib-developers as the next project would write a
      language that is so much better than OCaml?
      I think, so many people who are complaining about OCaml so often,
      should then start such a project. And if the languge would be better
      for me, I would use it. But I don't see anything that goes into this