From: John M. S. <sk...@oz...> - 2003-04-27 01:58:40
|
Brian Hurt wrote: > Especially in that I (the xarray module) don't know how large an 'a is. > Most likely it's just a reference off somewhere to some other type. Oh yeah .. my C/C++ experience lets me down here (many unboxed data types of different sizes). > Does anyone mind if I use named parameters for the resizer? Use the type > (for example): > resizer: numslots:int -> oldlength:int -> newlength:int -> int > ? > > Make it more obvious what the various arguments are. I agree, this is a case where named parameters are a good idea: usage of strategy function is going to be light (not much use), so the extra clutter of naming is small but the benefit of seeing those unfamiliar uses is correct is great. BTW: with respect to boxing: we cannot support the unboxed float array (etc) types the specialised Ocaml arrays can. Or can we? [Funny but once one gets down to optimisation, the familiar problems of C/C++ turn up again: smly, once one wants advanced name control, again the same problems, and solutions, begin to suggest themselves: C++ is messy because users want things that are convenient and efficient, which is not always the same thing as pure and clean..] -- John Max Skaller, mailto:sk...@oz... snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 |