Skip to content

[skip changelog] Add sketch specification to documentation #654

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

Merged
merged 1 commit into from
Apr 16, 2020
Merged

[skip changelog] Add sketch specification to documentation #654

merged 1 commit into from
Apr 16, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Apr 13, 2020

Please check if the PR fulfills these requirements

  • What kind of change does this PR introduce?
    docs update

  • What is the current behavior?
    The documentation already contains the Arduino library and platform specifications, but was missing an Arduino sketch specification.

  • Does this PR introduce a breaking change?
    No.

  • Other information:
    Built page: https://per1234.github.io/arduino-cli/sketch-specification/

Copy link
Collaborator

@matthijskooijman matthijskooijman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, good to have this documented. Some remarks:

  • I do not like the term "Arduino language" much. This will only enforce the Myth that Arduino runs on some magical language of its own, while it is really pretty much plain C++.
  • This mentions the difference between primary and additional sketch files, but does not indicate what this means. It might be too in-depth to detail the complete build process here, but perhaps it would be sufficient to say that all sketch files (.ino and I guess also .pde) are concatenated, starting with the primary sketch file and preprocessed, while all other source files are compiled as-is?

@per1234
Copy link
Contributor Author

per1234 commented Apr 13, 2020

Thanks so much for your input @matthijskooijman!

I do not like the term "Arduino language" much.

I was of the exact same opinion, but I have since been informed that it is the official viewpoint of Arduino that .ino/.pde files are written in Arduino language, not in C++. I realized that I'm no expert in what exactly constitutes a new programming language, so I'll take the word of the people at Arduino who know much more about this sort of thing.

You can see the discussion here: arduino/reference-en#476

And also my proposals to try to mitigate problems that could be caused by this stance here: arduino/reference-en#623


It might be too in-depth to detail the complete build process here, but perhaps it would be sufficient to say that all sketch files (.ino and I guess also .pde) are concatenated, starting with the primary sketch file and preprocessed, while all other source files are compiled as-is?

I actually had written that in my first draft, but then I decided that I didn't want to duplicate any of the content of the Sketch build process page.

Do you think it would be sufficient for me to add this text to the bottom of the "Additional code files" section:

For information about how Arduino sketches are compiled, see the Sketch build process documentation.

@matthijskooijman
Copy link
Collaborator

I was of the exact same opinion, but I have since been informed that it is the official viewpoint of Arduino that .ino/.pde files are written in Arduino language, not in C++.

Hm. Thanks for the links, I've added my opinion there :-)

I actually had written that in my first draft, but then I decided that I didn't want to duplicate any of the content of the Sketch build process page.

Yeah, we should not duplicate too much, linking to that page is definitely better. I would be a bit more verbose, though. How about:

For information about how each of these files and other parts of the sketch are used during compilation, see the Sketch build process documentation.

The documentation already contains the Arduino library and platform specifications, but was missing an Arduino sketch specification.
@per1234
Copy link
Contributor Author

per1234 commented Apr 13, 2020

I have now added the suggested text and link. Thanks @matthijskooijman!

@rsora rsora added the topic: documentation Related to documentation for the project label Apr 14, 2020
Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to approve and then to merge the PR (thanks @per1234 and @matthijskooijman for spending time in reviewing it all 👍 ) since we need badly a detailed documentation on this and other topics.

Anyway this is not a way to kill the discussion you all had on the Arduino Language topic, please refer to the issue you reported, as I think that the reference is the right place to continue.

Thank you all for the contribution!

@rsora rsora merged commit bcfd13b into arduino:master Apr 16, 2020
@per1234 per1234 deleted the sketch-specification branch April 16, 2020 17:30
@per1234 per1234 self-assigned this Nov 23, 2021
@per1234 per1234 added the type: enhancement Proposed improvement label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants