From: Reuben T. <rr...@sc...> - 2004-02-04 17:30:17
|
> I'm wondering though if the special-purpose stuff wouldn't be better going > straight into Cheia rather than stdlib. Quite possibly. It's really just a question of presentation. > Perhaps some metrics on level of usage of each function would be more > appropriate. Right. > Mmm... except that most of what is in Lua table ought to be in vector. So that's part of our re-org of the existing libraries. > > I'll end with a concrete proposal of what I think is best from the above: > > we should add "vector" and "function" to the current "string", "table" > > &c., and put all our additions into those four tables. One or two are > > tricky (are map and filter in function or table?) but they all fit in one > > of the four. Once that's done we can take another look. > > Well, fn or something rather than function presumably Keyword, duh. func? > Given the argument order, the existing convention suggests that map and > filter ought to be in function. Trouble with that is that then you can't > have vector.map, list.map, table.map, etc. So, either the argument order > needs changing (bad, because other languages have it that way round, and > it makes the most sense for partial applicaton), the convention needs > abandoning (might be bad, depending on this whole { __index = table } > business), or map needs to be on vectors only (bad; not very > forward-thinking). It's a real pity that next() is linear or map over vectors wouldn't have to be different from map over tables. -- http://www.mupsych.org/~rrt/ | maxim, n. wisdom for fools |