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. _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs