A few more questions

**5\. Is it possible to store an ``untyped`` value to be used in other 
templates?**

Trying to save `typ` for use in another dependent template will generate the 
error message [Error: undeclared identifier: 
'fast'](https://play.nim-lang.org/#ix=2j4I).
    
    
    template dsl(typ: untyped; code: untyped) =
      let keepTyp = typ
      `typ Algo`()
      code
    
    
    Run

This error can make sense afterward when you think deeply about what the 
compiler is doing but finding the root cause is not obvious when you have a lot 
of code as the [error location is not 
helpful](https://play.nim-lang.org/#ix=2j4I)...`

**6\. Is it possible to process ``untyped`` values in templates?**

Apart from copying `untyped` values like `code`, are templates powerful enough 
to parse `untyped` arguments or do you need to switch to macros to do the job?

For instance, if I want to define a template `options:` that set various 
options values, like:
    
    
    options:
      opt1 = value1
      opt2 = value2
    
    
    Run

Can it be done with templates only? 

Reply via email to