> Then I learned this morning that seq[Component] fails.

That really should be obvious.

A seq in Nim is similar to vectors in C++, that is basically a plain C array 
that automatically resizes when necessary, where resize is new allocation and 
copying elements. So all elements must have same type and same size as in C 
arrays -- as all refs and pointers have the same size, we can have different 
ref types in a seq and can test for exact type with "of" operator at runtime.

Note that we have sum types (objects variants) in Nim. 

Reply via email to