pony-tutorial icon indicating copy to clipboard operation
pony-tutorial copied to clipboard

`ifdef` is not documented in the tutorial

Open non-Jedi opened this issue 8 years ago • 10 comments

Probably not important for someone just learning the language, but it should still be at least mentioned, right?

non-Jedi avatar Aug 07 '17 16:08 non-Jedi

@jemc where do you think this should go?

SeanTAllen avatar Nov 30 '17 02:11 SeanTAllen

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.

jemc avatar Nov 30 '17 23:11 jemc

Certainly better than my idea @jemc. My idea was "uhhhhhh...."

SeanTAllen avatar Dec 01 '17 13:12 SeanTAllen

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?

rhagenson avatar Nov 19 '19 01:11 rhagenson

ifdef isn't experimental. iftype is.

SeanTAllen avatar Nov 19 '19 02:11 SeanTAllen

I think @jemc's idea to have a short compile-time conditionals chapter is a good idea.

SeanTAllen avatar Nov 19 '19 02:11 SeanTAllen

Goodness me, ificanread is apparently still under consideration though.

rhagenson avatar Nov 19 '19 02:11 rhagenson

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.

rhagenson avatar Nov 19 '19 04:11 rhagenson

So things to over

  • --define and ifdef combo
  • --debug and Debug package combo

Anything else @jemc?

SeanTAllen avatar Nov 27 '19 14:11 SeanTAllen

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.

jemc avatar Dec 03 '19 15:12 jemc