From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA15807; Tue, 29 Oct 2002 22:30:32 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA15733 for ; Tue, 29 Oct 2002 22:30:31 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from hod.void.org (pD9E5C9CC.dip.t-dialin.net [217.229.201.204]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9TLUUD17051 for ; Tue, 29 Oct 2002 22:30:30 +0100 (MET) Received: (from mamous@localhost) by hod.void.org (8.9.3/8.9.3) id VAA02775; Tue, 29 Oct 2002 21:30:33 GMT X-Authentication-Warning: hod.void.org: mamous set sender to leypold@informatik.uni-tuebingen.de using -f From: "M E Leypold @ labnet" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15806.65017.632328.706615@hod.void.org> Date: Tue, 29 Oct 2002 22:30:33 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] CamlP4 Revised syntax comment In-Reply-To: <788CDCDD-EB80-11D6-B534-0003930FCE12@inria.fr> References: <20021029.104703.59470751.avv@quasar.ipa.nw.ru> <788CDCDD-EB80-11D6-B534-0003930FCE12@inria.fr> X-Mailer: VM 7.00 under Emacs 20.4.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Damien Doligez writes: > begin match a with > | 0 -> ... > | n -> ... > end While we are at it, why don't we have something like: ok, man, we will be doing a match now. lets start matching: now, match the expression a against the following patterns first pattern is the pattern 0, if that applies do ... else if not try the pattern n, if that applies do ... ... ok, that were all the patterns and we are done matching now. Sometimes a short notation has some merits. :-) Not to be understood wrongly: I like the idea to experiment with different syntax. I like CamplP4. But I prefer to use the 'old' syntax (doesn't force me to write opening and closing stuff all the time, I can pretty well understand my own code without all that). I like the idea of a completedly different syntax (or even a Ada or Pascal like language, which maps to OCaml at the backend) though. Some contributors in this discussion seem to be driven by the idea, to make the programming language (a) either more similar to spoken English: Like: let a be expr1 in expr2 (b) more understandable to the computer Like: while expr do { ... } (the idea is to have more syntactic elements, to make the block structure explicit) I think there is merit on both efforts (really ambigous syntax is a pain even for humans and too cryptic code -- like obfuscated C is also a pain), but to tell the truth, I prefer to make things harder for the computer and easier for me. And I think let a = expr1 in expr2 is simpler to read, it resembles common mathematical notation better. I'm not really sure, wether I should take this discussion serious ... It's not even really about syntax, but replacement of single keywords. I'll just wait for the day, when someone of the radically-new-syntax school actually presents a working implementation and shows some medium to large program written in it. I think this is a good plan :-). ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners