> Everything is always a "tooling" problem. [...] If by that you mean that people sometimes tend to conveniently delegate things they don't want to deal with to tooling in a thoughtless way, I agree. I just don't think it's like that in this case.
> Ah we play the noun game now. Runnable examples are code and should be > written as code, don't separate identical concerns. My definition of the separate concerns at hand is just different from yours. Mine are "define what a module/proc etc. does" (regular source code) vs. "help people understand what it does" (docs including example code). That's not a noun game, that's a different view. I also like that the Nim project keeps testing code separate, because testing is another separate concern. > > Searching for runnableExamples in Nim's github project even finds some code > > where it is used outside of any doc comment context, which means it is > > silently ignored. > > That's just not true. OK now I'm confused: found this [https://github.com/nim-lang/Nim/blob/3d60f1b0af6fc3d8d9446a87bd26ff054562fa20/tests/generics/t8694.nim](https://github.com/nim-lang/Nim/blob/3d60f1b0af6fc3d8d9446a87bd26ff054562fa20/tests/generics/t8694.nim) which looks like this (excerpt): when true: # Error: undeclared identifier: '|' proc bar[T](t:T): bool = runnableExamples: type Foo = int | float true echo bar(0) Run When `int` in the type declaration is replaced with `nosuchtype`, I expect `nim doc` to throw an error when it tries to compile the `runnableExample` block, unless it is ignored. But it doesn't. Am I missing something here? Tested with the latest devel, installed with choosenim.