It is not clear what exactly you are trying to accomplish.
    
    
    d = (b: 10, c: "cd")
    

This already creates a tuple and is not a sequence. How does the sequence you 
talk about look? Since the tuple needs one `int` and one `string`, you would 
not only need to map the sequence items to tuple fields, but also store `b` as 
string (or `c` as int if feasible...), because a sequence cannot contain 
different types.

What you want to do is probably possible with a simple generic proc and 
[fields](http://forum.nim-lang.org///nim-lang.org/docs/system.html#fields.i,T) 
or 
[fieldPairs](http://forum.nim-lang.org///nim-lang.org/docs/system.html#fieldPairs.i,T).
 However:

  * The transformation would still be static and not dynamic, because you have 
to give the tuple's type at compile time.
  * Talking about _dynamically creating a tuple_ hints to a misunderstanding of 
the purpose of the tuple within Nim's typing system. Transformation between a 
tuple and a sequence would typically only make sense for data serialization and 
should be avoided otherwise.


Reply via email to