English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Unix.file_descr -> int ???
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-06-12 (08:21)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Unix.file_descr -> int ???
> [Passing fd numbers as arguments to exec-ed programs]
> This seems a legitimate use of file descriptors (there are some Unix
> programs which does that).

I won't go into POSIX standards to see whether this is legitimate or
not.  Yes, some (very few) Unix programs do this.  I can't help
thinking that it's ugly.

At any rate, if you're into that kind of stuff, Cash is for you:

> The most important debate is: should Ocaml give access to all Unix
> ugliness (and dirty tricks)? I think that for pragmatic reasons the
> answer should definitely be yes.

"Pragmatisme, que de crimes commis en ton nom"...  You mean, for
pragmatic reasons, you want ioctl() in Caml?  With its total lack of
typing and portability?

> Ocaml targets not only academia but also the real world 
> (otherwise, the Ocaml consortium has no sense).

WARNING!  Stereotype alert!  So, let's see, according to you, the
virtues of type abstraction should be reserved to academia, while the
"real world" (whatever the #$@%@ this means) is concerned about dirty hacks
and nothing else?  What are you going to tell us next?  Women can't
drive and men can't raise children? :-)

I can assure you that in an "industrial" programming setting,
guaranteeing (some amount of) Unix-Windows source-code portability is
a *lot* more important than the marginal Unix hacks you describe.

- Xavier Leroy
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