pony-tutorial
pony-tutorial copied to clipboard
`ifdef` is not documented in the tutorial
Probably not important for someone just learning the language, but it should still be at least mentioned, right?
@jemc where do you think this should go?
Hmm...
Probably ifdef, compile_error, and compile_intrinsic should all go in a new chapter named something like "Compile-Time Conditionals". The iftype keyword would also go in this chapter too when it is out of its "experimental" status.
The new chapter could go right before the "Gotchas" chapter, I suppose.
Certainly better than my idea @jemc. My idea was "uhhhhhh...."
Currently, ifdef is mentioned in both Keyword (in the table with brief usage) and Program Annotations (as possible annotation).
https://github.com/ponylang/pony-tutorial/blob/7e880412a2250ddc8c6611066ed613f3ae760766/content/appendices/keywords.md#L35
https://github.com/ponylang/pony-tutorial/blob/7e880412a2250ddc8c6611066ed613f3ae760766/content/appendices/annotations.md#L33
@jemc and @SeanTAllen is ifdef out of "experimental" status yet?
ifdef isn't experimental. iftype is.
I think @jemc's idea to have a short compile-time conditionals chapter is a good idea.
Goodness me, ificanread is apparently still under consideration though.
Unfortunately, I am not familiar enough with the breadth of compile-time conditionals to write such a chapter. If work starts on it, I am willing to help, but I cannot be the one to get the ball rolling on it. Placing the chapter after "Gotchas" makes sense to me for the timing/location of an advanced topic.
So things to over
--defineandifdefcombo--debugandDebugpackage combo
Anything else @jemc?
The other ones I mentioned were compile_error and compile_intrinsic.
For compile_error, it would make sense to mention that in conjunction with ifdef.
For compile_intrinsic, it's probably just worth mentioning what it does in case someone runs across it, but it's unlikely to be used by anyone unless they are working on the builtin package.