The following code:
{.push tags: [].}
proc hello() =
stdout.write "Hello, world!\n"
when isMainModule:
hello()
has an error at compile time, which makes sense, because hello() should be annotated with the WriteIOEffect. However,
{.push tags: [].}
proc hello() =
echo "Hello, world!"
when isMainModule:
hello()
has no such compile time error, despite doing pratically the same thing. When looking at the documentation, echo's routine signature explicitly states that it has no tags. Why?