On Thursday 03 April 2008 19:51:26 daniel.c.buenzli wrote:
> On 3 avr, 20:22, Jon Harrop <[EMAIL PROTECTED]> wrote:
> > The appropriate call is selected by the compiler after monomorphization.
> > So there is no ambiguity or need for type annotations etc.
>
> Well you need to tell the compiler at least once otherwise he won't
> know that e.g. you want to use physical equality on the strings for
> this set instead of say structural equality. As a side effect this can 
> be the source of interesting and hard to catch bugs (forgot to coerce
> to the right subtype) that you won't get with the more explicit
> functor way.

Sure. F# simply cures a practically important class of bugs that OCaml leaves 
wide open. Other bugs still exist.

> As always the less explicit you are the harder it is to reunderstand
> or find bugs in your code.

That is an awful policy. Not only is type inference an obvious counter-example 
but the complexity required by OCaml to solve mundane problems is clearly 
counter-productive. Look at the current thread on the caml-list about how 
unusable the Int64 type is.

> I always find it interesting that people 
> use terseness vs explicitness as a criterion to judge programming
> languages. In fact programming language designer should create them
> with code reading and not code typing in mind, but since lines of code
> to achieve a task seem to be the (unreliable) metric among
> programmers, this won't happen anytime soon.

Brevity isn't really the issue here. OCaml makes it easy to introduce serious 
silent data-corrupting bugs into your code in this respect and F# does not. 
The fact that F# also happens to be substantially more concise is really 
incidental.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html
-~----------~----~----~----~------~----~------~--~---

Reply via email to