caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] recursive modules redux, & interface files
@ 2001-03-18 23:05 Chris Hecker
  2001-03-19  0:01 ` Brian Rogoff
                   ` (2 more replies)
  0 siblings, 3 replies; 57+ messages in thread
From: Chris Hecker @ 2001-03-18 23:05 UTC (permalink / raw)
  To: caml-list


Two questions/problems:

1.  So, I understand that doing recursive types across modules is hard (but I'd say very important for decoupling large software), but is it true that I can't even call across modules recursively?  Even with mli files to resolve the types?  I find that incredibly hard to believe, but I can't get it to work and it seems the docs say it's impossible as well (so why am I posting about it, you ask?  Disbelief that it's not possible, I guess. :).

What is the point of separate mli files if they can't be used to declare a callable interface separate from the implementation?  Is this just a small feature that needs to be added to the linker (defer binding unseen modules until all the object files have been seen), or is there something really subtle going on?  Since everything compiles and type checks fine, and the subtleties that I don't understand in ocaml usually have to do with the type checker, I'm having trouble seeing how this could be that hard.  Example below.  Am I missing something?

2. Also, on a related note, why do the interface file and the implementation file (or equivalently, I believe, the signature and structure) both have to have all the concrete types duplicated?  I can see the value of having interfaces that hide some implementation stuff and abstract types, but if I've got a big fully-specified variant type in a .mli file, it's annoying and error prone (yes, I know the compiler will catch it) to have to retype the whole thing into the ml file (which I have to do if I want to hide anything else in the ml file, meaning I can't just have an ml without an mli).  Is this something the "include" keyword takes care of?  Heck, "#include<foo.mli>" would be an improvement over duplicating all the types. :)  One of the things I hate about C++ and is having to type function declarations/definitions multiple times.

Thanks,
Chris

---------
Example for Question 1:

--- t1.mli ---
val foo: int -> int
--- t1.ml ---
let foo x = if x = 1 then T2.bar x else x
--- t2.mli ---
val bar: int -> int
--- t2.ml ---
let bar x = if x = 2 then T1.foo (x-1) else x
--- main.ml ---
let _ = print_int (T2.bar 2)

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: [Caml-list] Why People Aren't Using OCAML? (was Haskell)
@ 2001-03-24  3:17 Arturo Borquez
  2001-03-24  8:03 ` Vijay Chakravarthy
  0 siblings, 1 reply; 57+ messages in thread
From: Arturo Borquez @ 2001-03-24  3:17 UTC (permalink / raw)
  To: mattias.waldau; +Cc: caml-list

On Fri, 23 March 2001, "Mattias Waldau" wrote:

> 
> Something we should think about also for Ocaml
> 
> http://www.jelovic.com/articles/why_people_arent_using_haskell.htm
> 
> "What can be done about this? First and foremost the Haskell community must
> make a standard distribution of Haskell that contains enough libraries to be
> useful. That should include a regular expression library, an Internet
> protocol library, a library for dealing with standard internet data and
> encoding, a crypto library, a multimedia library and a GUI library.
> 
> Next, the Haskell community must step out of its research circles and start
> publicizing Haskell to the practicing programmers. Write articles in DDJ and
> similar publications. Publish real-world programs written in Haskell."
> 
> Most of this is also relevant for Ocaml, for example there are
> crypto libraries and XML-support (for example PXP, which require wlex, which
> is a hazzle).
> 
Hi Mattias:
As I am part of the 'real world programmers' from the begining I have being trying to put OCaml to work in trivial but 'real world apps' with great success. I must recognize that I am not so skilled in the language to participate in the theoric-forum, but yet I have coded some apps (server services) to my company to show the reliability of OCaml, and we are all agree that is a great language. But a great language to be successful and honour the great effort done by the authors must be promoted actively outside the research environment. I believe that lots of programmers not use OCaml because they are unaware about its existence. How to do it? The strategy and decision is to be made by INRIA and/or Caml Consortuim. Personaly I would like to see OCaml world wide spreaded playing in the 'great leages'.    


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 57+ messages in thread
* RE: [Caml-list] Why People Aren't Using OCAML? (was Haskell)
@ 2001-03-29 14:26 Toby Moth
  0 siblings, 0 replies; 57+ messages in thread
From: Toby Moth @ 2001-03-29 14:26 UTC (permalink / raw)
  To: 'Daniel de Rauglaudre', caml-list

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Or else we could retaliate with
a picture of an oyster with a big fat
Pe(a)rl inside.

-----Original Message-----
From: Daniel de Rauglaudre [mailto:daniel.de_rauglaudre@inria.fr]
Sent: 29 March 2001 15:05
To: caml-list@inria.fr
Subject: Re: [Caml-list] Why People Aren't Using OCAML? (was Haskell)


> Maybe we should change the name of the language to "Objective
> Percheron" to match the book cover :-)

I heard somebody telling that my software was written in OCalm
(sounds in French as "calm water"). Therefore I suggest: a whale.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives:
http://caml.inria.fr

[-- Attachment #2: Type: text/html, Size: 1729 bytes --]

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2001-04-08 18:28 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-18 23:05 [Caml-list] recursive modules redux, & interface files Chris Hecker
2001-03-19  0:01 ` Brian Rogoff
2001-03-19 11:04 ` John Max Skaller
2001-03-19 11:41   ` Chris Hecker
2001-03-20 17:43     ` John Max Skaller
2001-03-21  4:03       ` Chris Hecker
2001-03-21  5:10         ` Patrick M Doane
2001-03-21  9:27           ` Chris Hecker
2001-03-21 18:20           ` John Max Skaller
2001-03-22  0:03             ` Patrick M Doane
2001-03-22  0:22               ` Brian Rogoff
2001-03-22 10:26                 ` [Caml-list] duplication implementation/interface Judicael Courant
2001-03-22 11:16                   ` [Caml-list] about typedefs... (was: duplication implementation/interface) Olivier Andrieu
2001-03-22 17:14                   ` [Caml-list] duplication implementation/interface Brian Rogoff
2001-03-22  9:11               ` [Caml-list] recursive modules redux, & interface files Francois Pottier
2001-03-21 23:24           ` John Prevost
2001-03-22  0:00             ` Patrick M Doane
2001-03-21 18:18         ` John Max Skaller
2001-03-21 18:19         ` John Max Skaller
2001-03-22 11:40   ` Markus Mottl
2001-03-21 18:41 ` Xavier Leroy
2001-03-22  0:23   ` Patrick M Doane
2001-03-22 12:02   ` Hendrik Tews
2001-03-22 13:01     ` Markus Mottl
2001-03-22 16:56       ` Brian Rogoff
2001-03-22 17:13         ` Daniel de Rauglaudre
2001-03-23 17:30         ` Fergus Henderson
2001-03-23 18:04           ` Brian Rogoff
2001-03-23 20:35             ` [Caml-list] Why People Aren't Using OCAML? (was Haskell) Mattias Waldau
2001-03-26  2:29             ` [Caml-list] recursive modules redux, & interface files Fergus Henderson
2001-03-27 22:11         ` John Max Skaller
2001-03-28  4:30           ` Brian Rogoff
2001-04-05 17:07             ` John Max Skaller
2001-03-27  8:21       ` Hendrik Tews
2001-03-30 10:27   ` [Caml-list] parser combinators Kevin Backhouse
2001-04-08 18:28     ` Daniel de Rauglaudre
2001-03-24  3:17 [Caml-list] Why People Aren't Using OCAML? (was Haskell) Arturo Borquez
2001-03-24  8:03 ` Vijay Chakravarthy
2001-03-24 18:38   ` Brian Rogoff
2001-03-24 21:55     ` Vijay Chakravarthy
2001-03-26  0:29     ` Dennis Gang Chen
2001-03-26  3:03       ` Brian Rogoff
2001-03-26 13:25     ` FabienFleutot
2001-03-29 13:48       ` Xavier Leroy
2001-03-29 14:05         ` Daniel de Rauglaudre
2001-03-29 14:14           ` Xavier Urbain
2001-03-29 14:38         ` Jean-Francois Monin
2001-03-29 16:19           ` Brian Rogoff
2001-03-27 23:43     ` John Max Skaller
2001-03-28  4:37       ` Brian Rogoff
2001-03-28 14:24         ` Joshua D. Guttman
2001-03-28 19:32       ` William Chesters
2001-03-27  3:43   ` Chris Hecker
2001-03-27  8:57     ` wester
2001-03-30 18:59       ` John Max Skaller
2001-03-28 22:00     ` Joseph R. Kiniry
2001-03-29 14:26 Toby Moth

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).