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

Add information about constants in C++ Cheatsheet (sidebar) #2045

Merged
merged 2 commits into from
Sep 23, 2020

Conversation

brusherru
Copy link
Contributor

There is no issue.

Previews:
image
image

Comment on lines +23 to +28
<Icon name="warning" /> Must be defined as
<code>
<span className="keyword">static constexpr </span>
<span className="type">typeof_{getPinLabel(pin)} </span>
<span className="variable">{formatPinLabel(pin)} </span>
=
Copy link
Member

Choose a reason for hiding this comment

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

This explanation looks silly to me. An attempt to teach a particular nuance in very limited space. I think this should be omitted here and explained in other places: in the docs and (at some moment) in the auto-generated C++ template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idea about the auto-generated C++ template sounds cool and I thought that's an awesome way. But now I think it's not so easy to implement. For example, what if C++ implementation already "touched", but only after that User added output-port?

About detailed explanation, in the docs, I totally agree. However, this is a rare case, I think when we create some nodes with the constant output. So I suppose that User will not use such snippet often and it might bring some pain to remember how to do it or go to the documentation page, instead of just copy-pasting the snippet.

So I propose to leave it as is.
At least for some time. Or until we bring some new snippets and "click-to-place" mechanism :)

@brusherru brusherru merged commit 36c8593 into master Sep 23, 2020
@brusherru brusherru deleted the tweak-cpp-helpbox branch September 23, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants