First of all, a bit of my history.
I worked in a C++ with a very generic 3D Mesh data structure (OpenMesh).
Everything was templated, and I could add arbitrary data to vertices, edges,
halfedges and faces. The data structure was basically the non-plus-ultra in 3D
geometry representation. But it had one drawback. Every build file that
included this Mesh datastructure got an increase in compilation time of 10
seconds. Meaning that the total build time rose up to over half an hour on a
fast machine. Everything, because the same datastructure got compiled over and
over again.
My question is, does Nim have anything to prevent this problematic development
in compilation time?
generic library:
type superGenericContainer*[T] = seq[T] # imagine something really
complicated and big here, not something so trivial as this
everything that actually get's used:
type IntContainer* = superGenericContainer[int64]
proc newIntContainer* : IntContainer = newSeq[int64]()
how I use it:
var ic : IntContainer = newIntContainer()
In the practical case the Generic container get's instanciated with exactly one
type, and form there on, only this type is used.