Would it be possible to add the Nim version at which a feature has been introduced in the manual ?
It would make easier to support older versions of Nim when writing a library that aims to be backward compatible.
I can always enclose old-feature specific code in a when « block »:
when (NimMajor, NimMinor) >= (1, 5)
The problem is, when looking at the Nim Manual, I can not see when a feature has been included. Has the include keyword always been there ? At which version has it been added ? I don't mean the keyword (because as I remember all the keywords have been introduced in advance, but not all keywords functionalities).
If the website page of the Nim Manual looks too overloaded with these informations, maybe we can add these version information in another specific page for reference.
Has the include keyword always been there ?
Yes, the include statement is pretty old.
I would not advise using compiles too much as it has some issues with scoping and compile time processing (for example it gives unused import warnings). What I would recommend doing is testing against older versions and adapting to them accordingly.