Version française
Home     About     Download     Resources     Contact us    
Browse thread
Wanted: your feedback on the hierarchy of OCaml Batteries Included
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] open Module (not?) considered harmful
On Thu, Nov 20, 2008 at 11:29:44AM -0000, David Allsopp wrote:
> Consider
> 
> open Array;;
> open List;;
> 
> (* Hundreds of lines of code *)
> 
> length [];;

Oh god yes, I was bitten by almost this just a few days ago, except my
code was:

  open Printf
  open Format
  
  (*...*)
  printf "I'm trying to debug something\n"

(The file was quite literally not more than 15 lines long, but it took
me a good hour to work out why that printf wasn't printing anything ...)

Rich.

-- 
Richard Jones
Red Hat