Cool - thanks! Slava Pestov wrote: > Hi Phil, > > Factor does not support inheritance so you cannot inherit from byte- > array. The approach you outlined is the right way to do it. > > Are you aware of the ulong-nth and set-ulong-nth words in the alien.c- > types vocabulary, which read/write ulongs from a byte array unsafely? > You need to wrap those in the sequence protocol (with bounds > checking, etc.) > > Slava > > On 5-Nov-07, at 10:54 AM, Phil Dawes wrote: > >> Hi Factor Team, >> >> I'd like to create a class 'ulong-array' which has a byte-array as its >> underlying storage, but overloads length, nth etc.. so that a 32bit >> binary array can be used in sequence functions like sort. >> >> I can see how to do this as a tuple with one slot containing the >> byte-array (and then making this an instance of sequence), but is it >> possible to just inherit from the byte-array itself and overload the >> methods? >> >> Many thanks, >> >> Phil >>
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
