Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[OSR] OCaml Standard Recommandation Process
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-01-28 (14:23)
From: Brian Hurt <bhurt@j...>
Subject: Re: [Caml-list] [OSR] OCaml Standard Recommandation Process
Jon Harrop wrote:

>There are also many features that I would like to steal from other languages:
>. The IDisposable interface from .NET and F#'s "use" bindings.
Is there a reason that Gc.finalise doesn't work?

>and some more involved ones like operator overloading.
I *hate* operator overloading.  My experience in C++ is for every time 
this feature is used legitimately (i.e. to implement complex numbers or 
whatever), it's abused 10 times- and that's ignoring C++'s use of the 
bit shift operators << and >> for I/O, and the use of + for string 
concatentation, both of which I'd argue really should be considered 
abuses, as far as I'm concerned.  And this is ignoring the difficulty of 
type inference in the presence of overloaded operators.

The best way to handle this IMHO is Haskell-style type classes.  Which 
solves the whole type inference problem, and rules most of what I 
consider abuses of operator overloading (for example, if you have a '+' 
operator, you also have to have a '*' operator- and what is "foo" * 
"bar"?).  But this is a very non-trivial change to the language.

Just my $0.02.