same remarks as 
[https://github.com/nim-lang/Nim/issues/14637#issuecomment-644338428](https://github.com/nim-lang/Nim/issues/14637#issuecomment-644338428)
 the standard nim version is:

  * more readable
  * syntax highlights correctly
  * interacts correctly with the rest of the language
  * leads to code that's more reusable
  * is correctly indented instead of relying on features only invented to 
support SCF (end if|case|for|etc)
  * supports block comments



etc...

If you have boilerplate, just use templates+macros, no need to bake in a 
sublanguage into nim. SCF is a misfeature that needs to be deprecated.
    
    
    import strformat, streams, parsecsv
    var x: CsvParser
    open(x, newFileStream(stdin), "-", '\t')
    template p(a: string) = echo &(a)
    p """
    
    My Report
    =========
    
    {"":-<20} {"":-<20}"""
    while x.readRow():
      p """{x.row[0]:<20} {x.row[1]:>20}"""
    p """{"":-<20} {"":-<20}"""
    
    
    Run

Reply via email to