Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] On bashing the OCaml-car...
Date: Tue, 28 Aug 2007 00:00:20 +0200	[thread overview]
Message-ID: <1188252020.46d349745925a@webmail.in-berlin.de> (raw)
In-Reply-To: <1188214444.13927.19.camel@rosella.wigram>

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


  reply	other threads:[~2007-08-27 22:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 10:41 Oliver Bandel
2007-08-27 11:34 ` [Caml-list] " skaller
2007-08-27 22:00   ` Oliver Bandel [this message]
2007-08-27 11:42 ` skaller
2007-08-27 22:29   ` Oliver Bandel
2007-08-27 22:58     ` Adrien

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=1188252020.46d349745925a@webmail.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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