On Sat, Jun 20, 2009 at 1:30 AM, Hugh Aguilar<hugoagui...@rosycrew.com> wrote: > Just as a quick example, my list program provided the ability to link two > lists together. Factor sequences don't; they only provide the ability to > append or prepend elements onto a list. Mine were also circular, and the > sequences (including dlink) don't seem to be. I say "don't seem to be" > because it is not real clear what the underlying data structure is exactly. > Most likely sequences are lists, but we aren't told how they are > implemented.
Sequences and dlists are two different things. Sequences are implemented as arrays in Factor, or array-like structures (a vector is a growable array, ranges and slices are 'virtual' sequences that don't have actual storage, but in all cases getting the nth element is an O(1) operation). Dlists in Factor are used as double-ended queues and are not circular. > Often, it takes less time to write > your own code than to figure out how somebody else's code works. This is > true for me anyway; I'm not very good at learning things. It goes both ways. Data structures are easy to implement for any competent programmer, but as soon as you start using libraries that must pass data back and forth, if those libraries use incompatible data structures it becomes a major pain (look at any large C++ code base that has more than one String class!). Also implementing something like SSL correctly and securely is an order of magnitude more effort than learning an API. Slava ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk