Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Opening note, 11 Aug 2023:
In late 2022, I first opened this repo without Issues or Discussions enabled. I quickly found that issues were being submitted anyway... as PRs. So, in response to demand, I opened Issues. (Insert the "wait for the campus' users to walk ruts into the field to show you where to put the paths" reference here.) I appreciate all your bug and quality-of-implementation reports that have come in there. Thanks!
Now I've started seeing Q&A discussions happening anyway... in Issues. So, again in response to demand including requests like #577, I'm opening up Discussions. I'll go ahead and take a pass through the existing issues to convert them to discussions where that seems appropriate.
— Herb

👋 Welcome!

Discussions is a place to:

  • Ask questions you’re wondering about.
  • Share ideas.
  • Engage with other community members.
  • Welcome others, be open-minded, and be kind.

Note the Code of Conduct always applies. In a nutshell, because it's worth repeating: Always be kind. Thank you!

You must be logged in to vote

Replies: 7 comments · 18 replies

Comment options

do not worry since you opened the repo a lot did change. while most people have rudimentary cpp2 front ends today i expect that we soon will be able to use something like "Gorilla ML" to Implement LLVM Language Frontends. then we do not even need normal maintainers anymore as LLVM offers a Solid API and Grolla ML can use that API with 90+ % there is enough space for exploration soon.

My most best cpp2 frontend is at present generated for GraalVM using the Truffle API and Gorilla. But i am improving the usability at present. I have chosen GraalVM because there exists LLVM support and i can use still use the JVM and GraalVM Debugging tools like Ast Visualizers and that.

My new Final goal is now to get a LLVM only cpp2 frontend AI generated and Compiled via cpp2 on graalvm which got again Implemented by AI.

my real goal is not to implement cpp2 but my goal is to implement any Language Faster and integrate it with existing tooling. For example the GraalVM cpp2 supports the vscode GraalVM extension and debugging tools so i can even use chrome devtools for cpp2 debugging even cross language boundaray.

I Only wanted to update you here as you updated us.

Much love for you.

You must be logged in to vote
0 replies
Comment options

@hsutter
Hello sorry by advanced if this is not the place to ask my first question but I am new and I want to know if the project aims to replace c++ or if it is a test branch for after improved c++ by proposing these modifications to ISO c++. I also want to know how I can help you. I have an intermediate level in programming but I don't understand all the concepts of C++. But I can come up with ideas and write code and documentation.
Thanks in advance

You must be logged in to vote
2 replies
@gregmarr
Comment options

A good place to start to learn about the project is to read the README and then watch the 2022 and 2023 CppCon talks.

@hsutter The 2023 talk isn't linked from the README. That would be good to add.

@hsutter
Comment options

hsutter Jan 5, 2024
Maintainer Author

@Gangneron Thanks for the interest! It's currently a place for me to try out my own C++ evolution proposals for C++, and yes I plan to continue to propose specific features and potentially the entire alternative syntax as a proposal for ISO C++.

@gregmarr Oh, right -- thanks for the reminder. Done: 7570f4f

Comment options

You must be logged in to vote
1 reply
@JohelEGP
Comment options

Oh, so you're looking to use cppfront to implement a Cpp1 proposal?
P2971 did that, although the implementation wasn't floated around in this repository.

Comment options

You must be logged in to vote
0 replies
Comment options

I will finish making the proposal over the weekend because I still have the translation to do

You must be logged in to vote
0 replies
Comment options

Hello!

I am newbie in cppfront and have a question.
I don't understand how to separate declaration and definition of functions and classes.
What is right way to separate code to *.h2 and *.cpp2 files?
How to compile such files via cppfornt tool?
Are there documentation about this case?

You must be logged in to vote
10 replies
@JohelEGP
Comment options

No, it's not part of the Cpp2 grammar.

@akornilov
Comment options

Usually project are separated into several libraries. Are any way to do this in cppfront?

@JohelEGP
Comment options

Just like your C++ compiler, I guess.

@akornilov
Comment options

In cpp we can provide headers with functions and classes declaration and binary library. Or modules since C++20. I try to understand how to do it in cpp2 :)

@JohelEGP
Comment options

The previous link shows one of the ways Cppfront handles the compilation of .h2 source files.
That will generate some source files (IIRC, .h, .hpp sometimes, and .cpp).
You use that as normal in your other source files and in your build system.
The caveat is that the pure Cpp2 flag makes it so that you can't include .h files (I think .h2 files were fine).

Comment options

Why don't you use the '.exe' extension?
clang++ cppfront.cpp -std=c++20 -o cppfront

I think it would be much better.
clang++ source/cppfront.cpp -std=c++20 -o cppfront.exe

Also add installation instructions to the readme. Because it's not obvious now.

You must be logged in to vote
5 replies
@gregmarr
Comment options

Why don't you use the '.exe' extension?

Platforms other than Windows don't use that convention. There is nothing preventing you from using that when you build it.

Also add installation instructions to the readme. Because it's not obvious now.

What do you mean by installation instructions? The documentation is the second link, after the license, at the top of the readme. The first link in the documentation is how do I get and build.

@MaxSagebaum
Comment options

Which links do you mean. I would aggre that adding a direct link in the readme would help. Currently what I see:
image

First page for documentation is:
image
What users have to read here is:
Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

It happend to me that I stopped parsing this at Overview:

Maybe this direct link in the readme would help: (After documentation)

Installation

# [Installation](https://hsutter.github.io/cppfront/welcome/overview/#how-do-i-get-and-build-cppfront)
@gregmarr
Comment options

I guess that makes sense.

@MaxSagebaum
Comment options

Created a pull request: #1422

@Denis535
Comment options

Platforms other than Windows don't use that convention.

Then write instructions for each platform. Right now, it seems very unintuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.