Re: [q-lang-users] Vector module
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2007-10-02 22:56:44
|
John Cowan wrote: > (:=) is a good feature, but has really nothing to do with this, and > should be in some generic place like stdlib (or in clib itself). I agree. In fact, eventually the entire stuff in reftypes.q should go into clib.q. My idea was to offer it as a separate package until some more testing has been done and the interface stabilizes. But I can also do that right away. > Using lists to implement put and putmap for tuples is not really good, > because the whole idea of mutable vectors is to avoid copying them -- > that is, to update them in various ways using only O(1) space. Well spotted. :) My excuse is that this is only a prototype... ;-) There used to be some reason why I didn't extend 'do' and the other generic list operations to tuples, but I can't remember now what it was... Maybe now is the time to make the interface to tuples more list-like. Oh well, one thing leads to the next. :) Maybe it would be useful to have tuple comprehensions as well? Another issue that I still need to solve is support for higher dimensions, matrices at least. Something along the lines of array2. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |