Version française
Home     About     Download     Resources     Contact us    
Browse thread
When functional languages can be accepted by industry?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William Chesters <williamc@p...>
Subject: Re: Caml wish list
thierry BRAVIER writes:
 > >         One could event think to reuse symbols like + for many functions.
 > >         Here is a simple proposal on how to do it that I would really enjoy to
 > >         see working :
 > >
 > >         Two new commands in OCaml structure (the syntax can be changed):
 > >
 > >         share + : 'a -> 'a -> 'a
 > >
 > >         this makes that + exists and is type-checked with type 'a -> 'a -> 'a
 > >
 > >         share + = add_int
 > >         share + = add_float
 > >         ...
 > >
 > 
 > I fear that your share proposal will not interact well with separate compiling of
 > modules:
 > how can the list of all share definition be completely know to the compiler ?

Well, I can't remember offhand how SMJ/NJ handles overloading, but it
seems to work reasonably well.  On the other hand, I am nowadays a
convert to ocaml's hard line on overloading---it's an absolute curse
of many, many C++ programs by coders whose enthusiasm outruns their
judgement.