Re: RAD vs. performance
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 02:37:01 +0100
Curtis W wrote:
Jon Harrop wrote:
What dynamic dispatch? Do you mean the polymorphism in Array.map, for
example?
The pattern matching required by the variants.
Pattern matching certainly ties you to a data structure (e.g. a list) but it
buys you clarity, brevity, performance and static checking.
How would using variants more make OCaml's stdlib more flexible? What
would you like the stdlib to do that it doesn't do already?
Well, standard library and operators :) I'd like to be able to write:
-------
let double x = x*2;;
let xs = [1; 2; 3.0];;
let doubles = List.map double xs;;
-------
Even better, I'd like to be able to use the standard library arithmetic
functions with my custom float implementation.
Ok. That isn't really related to the stdlib (unless you count parameterised
container types). Also, that is inherently dynamically typed. I'd rather
catch my misuse of 3.0.
So you're using a dynamically typed language that is doing unnecessary
boxing and you can't tell it to stop so you want to extend the language
to allow you to tell it when boxing is unnecessary? You should be using
ML. ;-)
Well, that's better than the language forcing me to tell it whether or
not to box every. single. value.
That isn't the alternative. OCaml doesn't force you to tell it whether or
not to box every value.
How are you proposing to remove code repetition? Overloading?
Well, using an actual object system would be better, but overloading
would be an improvement.
I prefer OCaml's non-overloaded approach to SML and C++'s overloaded
approach.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html
.
- Follow-Ups:
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- References:
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Dr Jon D Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Dr Jon D Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- From: Jon Harrop
- Re: RAD vs. performance
- From: Curtis W
- Re: RAD vs. performance
- Prev by Date: Re: RAD vs. performance
- Next by Date: Re: RAD vs. performance
- Previous by thread: Re: RAD vs. performance
- Next by thread: Re: RAD vs. performance
- Index(es):
Relevant Pages
|