Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Re: Common IO structure

Again, sorry for the delay in responding...

On Thu, 29 Apr 2004, Richard Jones wrote:

> Think of an API as like a user interface.  It's a UI for programmers
> to use.

This is a dangerous analogy, I think.  There are several differences.  
First, I damned well *expect* programmers to be willing to RTFM.  

Second, and more importantly, take care that in making the API easy to use
for the common case you don't make it impossible to use in the odd case.  
Being able to extend and reuse the library in unexpected ways and in new
situations is more important to me as making it easy to use in the common
case.  Because I inevitably end up in the odd case trying to make the 
library do something it wasn't designed to do, and discovering you can't 
do that.  This is annoying enough in programs- it's enough to make me dump 
languages in APIs.

And this is one case where we can have our cake and eat it too.  My 
opinion is that the base library should be as flexible as possible- and 
then we can provide wrapper classes/functions for the common cases.  This 
increases the number of classes and functions, however...

The Java.io library has it's drawbacks, I'll freely admit.  But the core 
idea- which is the same core idea as the Unix command line, I comment- is 
the best I've ever seen for doing I/O.

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian

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