Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to use Set Datatype
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] How to use Set Datatype
On Sun, 2004-12-12 at 08:12, Brian Hurt wrote:
> On Fri, 10 Dec 2004, Micha wrote:

> Another thing- longtime Ocaml programmers tend to inline their structure 
> definitions.  

Why? Because binding implicitly by name is basically bogus?
So you write

	Set.Make(struct let compare=String.compare ...

because the name in the functor 'compare' only agrees
accidentally. The anonymous struct there seems general,
and at least exposes explicitly the bindings.

Of course the *implicit* binding in C++ templates (dependent
name lookup) is something some of us have learned to hate
intensely.. especially when the template calls T().compare ..
and our input class spelled it 'Compare' ..


-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net