caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "M E Leypold @ labnet" <leypold@informatik.uni-tuebingen.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] CamlP4 Revised syntax comment
Date: Tue, 29 Oct 2002 22:30:33 +0100	[thread overview]
Message-ID: <15806.65017.632328.706615@hod.void.org> (raw)
In-Reply-To: <788CDCDD-EB80-11D6-B534-0003930FCE12@inria.fr>




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


  reply	other threads:[~2002-10-29 21:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-25 19:02 brogoff
2002-10-25 19:25 ` Oleg
2002-10-26  9:27 ` Stefano Zacchiroli
2002-10-26 11:19   ` Daniel de Rauglaudre
2002-10-26 17:38   ` David Brown
2002-10-26 19:27     ` brogoff
2002-10-28  8:38   ` Kontra, Gergely
2002-10-28  9:28     ` Oleg
2002-10-28  9:41       ` Florian Douetteau
2002-10-28 10:04       ` Stefano Zacchiroli
2002-10-28 12:20     ` Daniel de Rauglaudre
2002-10-28 16:53       ` brogoff
2002-10-28 16:56     ` Alexander V.Voinov
2002-10-29 18:15       ` Gérard Huet
2002-10-29 18:47         ` Alexander V.Voinov
2002-10-29 20:53           ` Damien Doligez
2002-10-29 21:30             ` M E Leypold @ labnet [this message]
2002-10-29 21:42         ` brogoff
2002-10-29 11:30 ` Pierre Weis
2002-10-29 16:48   ` brogoff
2002-10-29 17:20     ` Alessandro Baretta
2002-10-30 17:49 Arturo Borquez
2002-10-31  9:21 ` Daniel de Rauglaudre

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=15806.65017.632328.706615@hod.void.org \
    --to=leypold@informatik.uni-tuebingen.de \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).