caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Norman Hardy <norm@cap-lore.com>
To: Oliver Bandel <oliver@first.in-berlin.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Typesystem and Parsers
Date: Fri, 22 Oct 2010 16:43:46 -0700	[thread overview]
Message-ID: <02EDD7B5-BB14-4A51-878F-D3020C7B5FE7@cap-lore.com> (raw)
In-Reply-To: <20101022165950.13786wcej1xp31eu@webmail.in-berlin.de>


On 2010 Oct 22, at 7:59 , Oliver Bandel wrote:

> Also with arranging a parser (e.g. with ocamlyacc) both ways can be walked along, either by just accepting everything and build up the tree, and later detect erros in syntax or type... (for example all scanned entities given back as strings or string lists)...

Let me describe an advantage that I see for Scheme over OCaml which pushes in the opposite direction to your proposal.
Analyzing a Scheme  program such as (let ( ... (r ...) ...) ...) where the ellipses may be pages of code, I can put the cursor just to the right of the r and type splat B twice on at least the Mac and learn the scope of r.
There are few more frequent steps for me as I study Scheme code.
Any of several editors that are not Scheme savvy can do this and even the Mac's Terminal program (a glass TTY for the shell) knows this trick.
I miss this in OCaml.
Perhaps this is because the gross parsing of Scheme is carried out at the lexical level—parentheses first!

As I reason about the scope of an OCaml variable, the whole cache of program logic in my head is flushed!
And them I am not sure of the result.
A systematic algorithm to determine scope is complex and error prone.

I want simple syntactic rules to determine scope, rules that fairly general editors can help with.

  parent reply	other threads:[~2010-10-22 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 14:59 Oliver Bandel
2010-10-22 17:41 ` [Caml-list] " Oliver Bandel
2010-10-22 23:43 ` Norman Hardy [this message]
2010-10-23  2:25   ` oliver

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=02EDD7B5-BB14-4A51-878F-D3020C7B5FE7@cap-lore.com \
    --to=norm@cap-lore.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=oliver@first.in-berlin.de \
    /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).