3 ms·
Would you mind to provide some link that illustrates what you mean exactly?
by c-smile 8y ago
Would you mind to provide some link that illustrates what you mean exactly?
- pjmlp 8y agoBasic examples, a big late to go diving into old documentation. Modula-3 version: GENERIC MODULE Slices(T) TYPE Slice = RECORD start : REF T; (* If you want the GC out of the way, replace with UNTRACED REF T*) length: CARDINAL; ... END; END Slices; Or one could simply use open arrays: TYPE Slice = ARRAY OF T Eiffel version: expanded class Slice[T] start: detachable T; length: INTEGER_32; ... end Naturally, one would use Array[T].slice() instead. http://smarteiffel.loria.fr/libraries/api/lib.d/storage.d/loadpath.se.d/collection.d/ARRAY/ANY.html#slice http://smarteiffel.loria.fr/libraries/api/lib.d/storage.d/lo...
- c-smile 8y agoYeah, thanks a lot. That is really it. Same as in D lang. In fact D's array is just a slice. At least it used to be so 10 years ago. GC there does the rest - as in Modula-3.