From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A68F1BC6C for ; Tue, 28 Aug 2007 00:00:23 +0200 (CEST) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7RM0MKJ012296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 28 Aug 2007 00:00:23 +0200 X-Envelope-From: oliver@first.in-berlin.de Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id l7RM0LuM029237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Aug 2007 00:00:21 +0200 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id l7RM0KkL029228; Tue, 28 Aug 2007 00:00:20 +0200 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-070-084.pools.arcor-ip.net (dslb-088-073-070-084.pools.arcor-ip.net [88.73.70.84]) by webmail.in-berlin.de (IMP) with HTTP for ; Tue, 28 Aug 2007 00:00:20 +0200 Message-ID: <1188252020.46d349745925a@webmail.in-berlin.de> Date: Tue, 28 Aug 2007 00:00:20 +0200 From: Oliver Bandel To: skaller Cc: caml-list@inria.fr Subject: Re: [Caml-list] On bashing the OCaml-car... References: <1188211279.46d2aa4f77e5b@webmail.in-berlin.de> <1188214444.13927.19.camel@rosella.wigram> In-Reply-To: <1188214444.13927.19.camel@rosella.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Miltered: at concorde with ID 46D34976.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bandel:01 in-berlin:01 0200,:01 bandel:01 expr:01 expr:01 elif:01 syntax:01 lambda:01 ocaml:01 syntax:01 ocaml:01 lambda:01 ocaml's:01 sourceforge:01 Zitat von skaller : > 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