Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.programming Subject: Re: generating permutations Date: Sun, 22 May 2016 22:58:55 +0100 Organization: A noiseless patient Spider Lines: 20 Message-ID: <87vb25sqjk.fsf@bsb.me.uk> References: <86298170-5592-40fa-a275-7e90d472e2ce@googlegroups.com> <6d8de1c0-c835-4a67-b115-25249177e717@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="1023"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R9bB098A9eD18UB+FtMYTeTQxAJE0Z8k=" Cancel-Lock: sha1:ThMzwgtCGwVOqUltq/01m/b6Sn0= sha1:2mDNepXePFOGXXXRM8vstr8Qj8g= X-BSB-Auth: 1.43f019f091300e9655b5.20160522225855BST.87vb25sqjk.fsf@bsb.me.uk Xref: csiph.com comp.programming:6643 luser droog writes: > [...] But an array > is implemented with a hefty 'dope vector' or descriptor or display which > allow simple slicing to still share the original data through a modified > descriptor. The result will still be rectangular, but is no longer bound > by the linear mapping of the generalized indexing formula. The descriptor > will be augmented with extra index-transformation powers. Yes, surely a slice (like yours at least) is just an array whose indexes go through a table first? And it seems possible (at first glance) that you could implement this table as one of your unsliced array objects. This might be slow for something or memory hungry for others (which it why some languages have a more constrained notion of a slice) but often the best plan is to implement something and see if indeed suits your purpose. -- Ben.