-
Notifications
You must be signed in to change notification settings - Fork 260
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[SUGGESTION] GH Discussions #577
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
Comments
See also #24, |
Ok, I can understand (and already mentioned) that (the administrative burden), but the OP in response asked for links to the "existing places" that Herb mentioned he uses, but I don't see them on the project README and I'm unaware of where Cpp2 is being discussed, except Herb's blog (and that's mostly one way). In addition, although Herb says he doesn't want to start a community, by making the project public on GitHub he essentially has done so. |
Searching for that error message in the code and blaming the line was fruitful: #75 |
From what I've seen by lurking the project for a few months, it's mostly these github issues and pull requests. Sometimes Herb points to material he's already written (papers or the wiki of this project). |
It's also discussed in r/cpp threads |
I'm not convinced by the example with cyclic dependency. The equivalent: int foo(int x = bar())
{
return 3 * x + 1;
}
int bar(int x = foo())
{
return x / 2;
}
int main()
{
return foo();
} cannot be compiled and I don't think you can get around the cycle, because there's no way to declare one function before the other. |
OK, let's try it! Done: cppfront Discussions Thanks! |
I'll also take a pass through the open Issues that looks like they're questions or discussions, and convert them into Discussions (apparently there's a button for that somewhere). |
True. In Cpp2 which requires overloading instead of default parameters, you can compile it... though it leads to an infinite recursion at run time in that particular code: Godbolt |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
This is not a suggestion regarding syntax or the tool itself. I just tried using cppfront on a program that used a standalone function with a default argument and got a message saying:
It wasn't too difficult to add a second function that called the first with an extra fixed argument, but I was intrigued so I looked in the wiki and also searched the open issues for "default" or "default arg" and found nothing. I realize that this is your experiment and you're probably quite busy to be answering queries like explaining the rationale for the above, but I'd like to suggest that the project use GitHub Discussions to allow such questions to be posed. For this particular instance, you could alternatively have a
documentation
label until the grammar and its documentation are more settled down.As an aside, although I understand that, based on your CPPcon 2022 talk, many design/syntax decisions are geared at not having to teach parts of C++ that are, shall we say, "undesired", the tradeoff is that many developers will have to "unlearn" practices that are not necessarily "bad", but --at least-- in the current state of Cpp2/cppfront-- add quite a bit of verbosity.
If you don't want to use GH Discussions, please go ahead and close the issue.
The text was updated successfully, but these errors were encountered: