iz 0.6.0-beta.2

streams, property descriptor, serializer, binder, etc.

To use this package, put the following dependency into your project's dependencies section:




iz is a general purpose library for the D programming language. It includes streams, containers, a serializer, property binder, Pascal-like sets, Pascal-like properties and more.

Runtime incompatibilities

(dont) Destroy

This library experiments manually managed classes lifetime. Most of the classes declared in iz are not compatible with new and destroy, instead construct and destruct must be used.

  • destroy calls the destructors from the most derived to the base using the dynamic type information of each generation and without considering the static type of the argument (which may be correct).
  • destruct calls the destructor defined for the static type of the argument unless it is passed after a cast to Object. Even in this case, only the most derived destructor gets looked-up using the type information. Once found, the other destructors are called by inheritance (i.e like what does super() to constructors). This system, since not built into the language, is provided with a mixin template.

As a consequence, destroy or the GC will segfault, due to a double call to the destructors, if iz classes that do not directly inherit from Object (i.e non-empty inheritance list) are not accurately handled with construct and destruct.

D arrays

Still because of manual memory management, D arrays (e.g int[] a;) are not really usable in iz classes.

A D arrays consists of two members. One of them is a pointer that's managed by the garbage collector. Since the arrays parents, classes or structs, are not known by the GC, during any collection the GC thinks that a D array is orphan and it frees the chunk pointed by the pointer. By default this library uses GC-free arrays in its classes and other aggregates. Any container based on custom allocators will also be compatible with iz class system.

In order to use default D arrays two workarounds exist:

  • call GC.disable at the beginning of the program.
  • use std.experimental.allocator functions makeArray(), shrinkArray() and expandArray() with Mallocator.instance and never .length and Appender. Uses local copies in order to work safely with Phobos algorithms.

Note that D arrays are not affected when used as local variables. This is even a case where the GC is useful. The lifetime of the aggregates is often known and deterministic so the associated memory can then be considered as polluting the GC heap.

Build and setup

  • using Coedit: open the file iz.coedit in the project menu, item open, compile, install in the libman.
  • using DUB, dub build --build=release.
  • using shell scripts, see the scripts folder.


  • CI Status
  • warning, unstable API, subject to heavy design changes.
  • Boost Software License 1.0

Authors:Basile B.

Dependencies: none

0.6.0-beta.2 2017-Apr-03
0.6.0-beta.1 2017-Mar-09
0.6.0-alpha7 2017-Feb-06
0.6.0-alpha6 2016-Nov-05
0.6.0-alpha5 2016-Oct-02
Show all 23 versions

statistics are temporarily disabled.