* Re: autogeneration of *.mli files
@ 2000-07-26 11:43 Julian Assange
2000-07-28 9:09 ` Sven LUTHER
0 siblings, 1 reply; 3+ messages in thread
From: Julian Assange @ 2000-07-26 11:43 UTC (permalink / raw)
To: caml-list; +Cc: proff
Thanks for all your comments on this issue. I'll try and respond more
tomorrow, but for now here's a quick summary of my thoughts:
o The current mli situation is not nearly as bad as I was
previously led to believe.
o I didn't know about ocaml -c -i
o I didn't know that symbols could be accessed safely from differing
*.ml files, without writing an *.mli interface
o While I'm only relatively new to ocaml, the fact that I
didn't know these two implementation points, yet feel
reasonably comfortable with the language proper shows a
weakness in the documentation.
o There is a need for a a tutorial (in English) on the
interaction of ocaml tools, symbols and program
structure. Something like `Creating non-trivial software
projects with Ocaml'. Which takes one through:
o how to call the compiler
o using OcamlMakefile and other build tools
o when and where to use seperate .ml files
o name space issues
o encapsulation and modularisation of functions and types
o in what circumstances one should write .mli files
o calling ocaml -c -i
o linking in external libraries
o objects vs modules
o when to use the debugger
o example design-compile-edit-debug-optimise cycles that
work for experienced O'caml coders.
Hopefully the Oreilly book will address some of this.
o If one doesn't use *.mli files, are there issues of name-space polution?
Does using a mli interface actually prevent exports of symbols not
defined in the interface?
o While ocaml -c -i exports types, I presume it doesn't export
comments, and that it exports many more types than you would
normally want in your .mli interface? Even a flag to export
the immediately preceding comment would be useful.
o While a number of people talked about writing *.mli's by
hand for design purposes, it seems to me me that the vast majority
of mli's have their genesis from ocaml -c -i.
o To examine the behavior of type inference, I often send code fragments
to the top-level. It would be nice to a version of ocaml -c -i which
`annotated' ml code in context, either as type decelerations or commented
out type declerations, rather than just spitting out the types on their
own. This would improve program readability without sacrificing the
benefits of type inference. Doesn't efuns do something like this?
o For those people who really do write to .mli specs, how about the
reverse, annotation of .ml files based on comments and types in
the corresponding .mli?
o Reading unfamiliar ocaml code that has no comments or type
annotations is usually substantially harder than code that has
them. Cut and pasting comments and or type declarations to and
from mli and ml files strikes me as a waste of human
intelligence. Obviously others feel the same way, which is mli
files are often out of sync with correspinding ml files.
Cheers,
Julian.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: autogeneration of *.mli files
2000-07-26 11:43 autogeneration of *.mli files Julian Assange
@ 2000-07-28 9:09 ` Sven LUTHER
2000-08-03 5:44 ` Jacques Garrigue
0 siblings, 1 reply; 3+ messages in thread
From: Sven LUTHER @ 2000-07-28 9:09 UTC (permalink / raw)
To: Julian Assange; +Cc: caml-list
On Wed, Jul 26, 2000 at 09:43:32PM +1000, Julian Assange wrote:
>
> Thanks for all your comments on this issue. I'll try and respond more
> tomorrow, but for now here's a quick summary of my thoughts:
>
> o The current mli situation is not nearly as bad as I was
> previously led to believe.
>
> o I didn't know about ocaml -c -i
But notice that the -i output is not at all times a good .mli file, especially
i think there have been problems when object are concerned (well that was with
2.04). Don't know details, but there must be a post in the lists archive about
it.
Friendly,
Sven LUTHER
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: autogeneration of *.mli files
2000-07-28 9:09 ` Sven LUTHER
@ 2000-08-03 5:44 ` Jacques Garrigue
0 siblings, 0 replies; 3+ messages in thread
From: Jacques Garrigue @ 2000-08-03 5:44 UTC (permalink / raw)
To: luther; +Cc: caml-list
From: Sven LUTHER <luther@dpt-info.u-strasbg.fr>
> > o I didn't know about ocaml -c -i
>
> But notice that the -i output is not at all times a good .mli file,
> especially i think there have been problems when object are
> concerned (well that was with 2.04). Don't know details, but there
> must be a post in the lists archive about it.
This should be much better since 2.99.
There are still some small problems in 3.00, corrected in CVS.
Since ocamlbrowser uses the same printer, and has too parse such
generated interfaces, any bug here would be a bug in ocamlbrowser.
Jacques
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-08-03 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26 11:43 autogeneration of *.mli files Julian Assange
2000-07-28 9:09 ` Sven LUTHER
2000-08-03 5:44 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox