Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ifdef is not documented in the tutorial #216

Open
non-Jedi opened this issue Aug 7, 2017 · 10 comments
Open

ifdef is not documented in the tutorial #216

non-Jedi opened this issue Aug 7, 2017 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@non-Jedi
Copy link
Contributor

non-Jedi commented Aug 7, 2017

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

@SeanTAllen SeanTAllen added the help wanted Extra attention is needed label Nov 4, 2017
@SeanTAllen
Copy link
Member

@jemc where do you think this should go?

@jemc
Copy link
Member

jemc commented Nov 30, 2017

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.

@SeanTAllen
Copy link
Member

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

@rhagenson
Copy link
Member

Currently, ifdef is mentioned in both Keyword (in the table with brief usage) and Program Annotations (as possible annotation).

| ifdef | when defining a build flag at compile time: ponyc –D "foo"

@jemc and @SeanTAllen is ifdef out of "experimental" status yet?

@SeanTAllen
Copy link
Member

ifdef isn't experimental. iftype is.

@SeanTAllen
Copy link
Member

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

@rhagenson
Copy link
Member

Goodness me, ificanread is apparently still under consideration though.

@rhagenson
Copy link
Member

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.

@SeanTAllen
Copy link
Member

SeanTAllen commented Nov 27, 2019

So things to over

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

Anything else @jemc?

@jemc
Copy link
Member

jemc commented Dec 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants