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
[Caml-list] Some/None
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-25 (12:25)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Some/None

On Thu, 25 Apr 2002, John Max Skaller wrote:

> Oliver Bandel wrote:
> >>type file_data =
> >>      | Regular of int (* file size in megs *)
> >>      | Directory of int (* number of entries *)
> >>      | Special
> >>    ....
> >>
> >
> >nice idea. :)
> >
> Perhaps. I would say designing appropriate types
> and functions for a system is hard, in any language.
> The difference with Ocaml is that representing
> your designs is much easier than, say, C or C++.

Yes. I see it.
I have to explore the type-system of Ocaml
and it's facilities more intensive.
It's a wide field.

But I can see, the advantages right now.

But when you have written code in C and Perl
formany years, it's really an unknown land...
C and Perl don't give you results like
"Some 8" or such.
You only have a raw value in C (no matter if it is a
int, char, a function pointer or a pointer to
data of any type (where the types themselves
are never types in theit own right. If using
typedefs in C that is not comparable to the
type-statement of Ocaml.... that's confusing
in the first moment (even if the advantages
will get clearer from time to time))).

It could possible that maybe one day there will be
a C-toplevel, giving back the type of a C-data
(maybe gdb can be used for that). But that is
nothing, what the language itself supports.

So at first contact with Ocaml it seems
strange for C-/Perl-programmers (even
if it's possible to have a slight idea
of what is possible with that typesystem).

> The language is very expressive and yet compact,
> and it is very rarely that I bother representing
> a design on paper before coding .. the code is so
> expressive of the design it usually isn't necessary ..

It's nearly natural language you mean? ;-)

> Just my usual warning .. ocaml is a powerful drug ..
> its additive ..

I know. I reached the state, where I can acknowledge this.
And I'm prising OCaml wherever I can, even if I only have
a slight insight of it.
Maybe, some weeks or months later I will not ACK that
it's a drug - the typical reaction of a addict people:
"No, I'm not an OCaml-addict. I can stop whith it,
whenever I want to! Really! Believe me! But today I
don't want to stop programming with it... but I could
really, if I wanted to... no, I'Äm not addict..." ;-)

> a one way street .. ask Markus Mottl ..

He's really addict. So he would not say that it's
a drug. ;-)

> you just won't be able to go back to C/C++ afterwards ..
> the withdrawal symptoms are quite deadly .. :-))


I know it.

Even if I stumble in Ocaml right now (but can walk better
than in my last Ocaml-phase, some months ago (I had paused
learning/using it until  the english translation of the
O'Reilly book was published in the net...))

I see the many advantages of it, compared to C.

Always when I look back to C-programming, I know,
that programming paradise is not far away when looking
forward to Ocaml. :)


P.S.: Why not doing some Ocaml-marketing and send a mail to
      Mr. Greeve from the Brave GNU World?
      Doesn't it make sense to make it more public...?
      Or is it better to wait until the OCaml-book will
      be available in the bookshops?

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: