Feedback after 6 months developing in Cpp2 #1412
Replies: 3 comments
-
I think that tooling (clang-tidy, etc) and error messages are because cppfront is a playground for a new syntax and not meant for actual use. |
Beta Was this translation helpful? Give feedback.
-
I'm building something with cppfront too. As for Clang-Format, you can use Cpp2-supported version by Johel Ernesto Guerrero Peña, it works pretty well. |
Beta Was this translation helpful? Give feedback.
-
Nice feedback. There is also a prototype for a language server. https://github.com/vanceism7/ls-cpp2 Everything is there: But still in prototype state. 😆 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone 👋,
I apologize in advance, this post is a bit long. I am writing this post to share my experience, hoping that it will be of interest to some people. I would also be curious to hear your own feedback and opinions on development in Cpp2 to see if we share similar perspectives or if your experience has been different.
Introduction to myself and my project
First of all, I've been coding in C++ for about 10 years .I'm not the best, but I'm doing pretty well.
Passionate about the go game, I embarked on the idea of creating a Go AI.
Since I already had my own deep learning library in C++20, I thought this project would be a good opportunity to test cppfront.
In the end, the AI couldn't learn to play properly (even if something resembling go seems to be emerging), but I managed to create a Qt application to play go game, set up an AI, and train it by having it play games against itself in a loop. The Qt part is in C++, but all of the game engine, rule implementation, AI model definition, and training are entirely in Cpp2.
Here is the GitHub project repository: https://github.com/MatthieuHernandez/gopp2
Feel free to take a look at the project and make suggestions on the Cpp2 section, as I'm not sure I've done everything correctly.
Now let's get to the point: what did I think of Cpp2?
I made a list of pros and cons. Tell me if you agree with it.
PROS:
in
,out
,inout
parameter system is, in my opinion, the language's greatest strength.as
is really handy.operator=
for all constructors is a very good idea.CONS:
-pure-cpp2
option, which generates a *.h file for the declaration and a *.hpp file for the implementation.unique_ptr
to work in Cpp2 in certain cases, and I can't remember exactly why. I switched toshared_ptr
instead.In conclusion, I really enjoyed learning Cpp2 😊 The language is still lacking in maturity, but that's normal at this stage.
On the other hand, I would have made much faster progress on my project if I had done it in C++ rather than Cpp2.
I spent far too much time trying to figure out how to fix or work around Cpp2 issues that I would never have had in C++ or that I would have been able to solve instantly.
Beta Was this translation helpful? Give feedback.
All reactions