Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:
>
> > If you can remember the value ONE (one means: 1, type: int),
> > then this is completely logical and very fine.
> >
> >   expr1; expr2; expr3
> >
> > are NOT ONE expression; they are a sequence of expressions.
>
> Unfortunately no, this is indeed one expression.

In the manual they call it a sequence of expressions.
I think the reason why they called it this way, is to express something.

And, btw, if the whole functional programming paradigm is correct
(and if I understand it correct), a whole program can be seen as one
expression. (And *any* program can be expressed as *one* expression...
...possibly by rearanging it.)

So, this means: thie argument (that expr1; exprr2; expr 3  is one
expression) does not help here, if the whole program can be seen
as an expression.
If the whole program can be an expression, will a whole
program be possible in the if-then-else construct?

This would make no sense, IMHO.
So you would either need delimiters like { and }
or "elif" and "endif" or you say, only one basic expression
will be seen as an expression.

But if you think this would make sense, you can please explain me this.

If all can be expressed in lambda-calculus (which you might be
very fluently in), then languages like lisp or scheme would fit your
needs better? Then the whole program will be *obviously* one
expression.
But then there would be no need for any other syntax like the lambda calculus.

But OCaml is a multiparadigm language, so it has some additional syntax.
It's not your taste, but the taste of others.

Maybe it's only a kind of taste, but I like the OCaml style.

If you don't like the way it is, and like the C-ish/Perlish style more,
than this is your taste, and nothing where OCaml can be considered
badly designed. I don't say OCaml is perfect, but IMHO your arguments
were based on what you expected to be a good style of syntax
(if-then-else-stuff).

I have a different opinion on that and like OCaml the way it is.
I have used C and Perl a lot and really were annoyed from the
syntax of them. OCaml IMHO is much clearer here!

But you as a computer scientist / lambda calculus person,
(what I assume you are) may find OCaml's syntax unclear.
But I don't see, why C-ish/Perl-ish/Felix-ish style would be better.
IMHO it's worse.

It's a point of view, IMHO. I think the if-then-else-elif-endif-stuff
as you would prefer it, is best suited to make programs very clumsy.


Ciao,
   Oliver