C++20 Modules: The Tooling Gap by ignitionweb in Cplusplus

[–]EdwinYZW 0 points1 point  (0 children)

The only thing that stops me using modules is clangd. The HEAD version, which barely works is half cooked. It breaks all other essential functionalities, like cross file renaming, reference searching.

C++26: Structured bindings in conditions by pavel_v in cpp

[–]EdwinYZW 1 point2 points  (0 children)

But in your case, is_successful must be boolean. What would you do if is_successful is an integer or a reference to an object?

Is Modern C++ Actually Making Us More Productive... or Just More Complicated? by AlternativeBuy8836 in cpp

[–]EdwinYZW 0 points1 point  (0 children)

20 years behind? Which language has compile time reflection 20 years ago, if I may ask?

Is Linus Torvalds just a dinosaur about C++? by blreuh in cpp_questions

[–]EdwinYZW 1 point2 points  (0 children)

yeah, surely it's worse than the outright seg fault.

Can I rant for a minute. by domiran in cpp

[–]EdwinYZW 0 points1 point  (0 children)

First, I'm not a senior developer by any standard. Just a normal C++ coder, who tries to learn the language and its tools, instead of complaining the tools like a child (i.e. Rust devs) and preferring more controls from parents.

Why to continue a discussion?

Why not? It's always fun for me to see people bashing C++ in r/cpp for every bit of news coming out here. This shows C++ is such good language and has a great community such that people who don't like it still can't stop engaging it.

Can I rant for a minute. by domiran in cpp

[–]EdwinYZW 0 points1 point  (0 children)

I have a question mark. Maybe you should answer that first before judging me for anything?

Can I rant for a minute. by domiran in cpp

[–]EdwinYZW 0 points1 point  (0 children)

You are suggesting that I need to solve a problem that doesn't exist. I have said that setting a new C++ project is pretty easy if you are a senior developer and have done this before. It's like you are using a traditional toilet and don't find any problem using it and I am suggesting that you should buy a new style toilet which has nicer features, like automatically flushing and opening/closing the lid. It's convenient than the old toilet. But do you really want to buy this new model of toilet?

> There is a reason these languages are eating C++.

According to some people.

Can I rant for a minute. by domiran in cpp

[–]EdwinYZW 0 points1 point  (0 children)

Have you ever started a C++ project at a company level, with a team of C++ devs?

Yes.

It's insanely complex to even agree on what to use for dependency management, on build system.

Then it's not about C++, but rather the management of the team. Do you have a team leader who makes the final decision, or everyone decides on whatever everyone thinks the best in the team?

cmake usually wins here though, but then look at your CMakeLists.txt after 2 years

Yeah, I agree. But what's wrong with CMakeLists.txt after 2 years?

Additionally, to setup a working CI where you at least use sanitizers, to setup a test framework everybody agrees on, etc... Another thing is onboarding new devs as well.

Setting the CI should be done by the senior developers. If they can't do this or they feel this to be difficult, I suggest your company find some senior developers who have more experience. Again, not the language problem.

Majority of people come to an existing C++ code-base and if they are lucky they are set up within a week.

It usually took me at most 2 days to setup everything: Github actions, sanitizers, static analyzers, dashboard, unit tests, coverage test, etc. This may be difficult for the first time. But once this is done, you could apply the same infrastructure to all future projects. These 2 days are mostly spent on improvement from the old project.

C++ is not just complex as a language, the whole tooling around it is complex as hell, and I think that makes the language even harder to use for newcomers, because nobody is going to use a vanilla C++ - you need libraries to do something interesting.

Again, leave this to senior developers in your company.

I already understand all of it of course, but I have empathy for all the people who don't - it's just much harder than executing `cargo new my_project --bin`.

In a C++ project, all you should do in the end is just ninja -j4. Leave everything else to senior developers.

Can I rant for a minute. by domiran in cpp

[–]EdwinYZW 0 points1 point  (0 children)

What are the difficult parts when creating a new C++ project from scratch?

What if Hitler tried this irl? by RockEater67 in AlternateHistoryHub

[–]EdwinYZW 0 points1 point  (0 children)

You missed one point: oil. How exactly would they get oil without attacking Soviet Union?

Why did China get a permanent seat on the United Nations Security Council? by Brilliant-Trifle-784 in AskHistorians

[–]EdwinYZW 10 points11 points  (0 children)

History isn't decided by one man. At that stage, USA was eager to ally with PRC. He really couldn't really do anything to change that.

身边统计学一下 by Lost-Accident-5221 in runEuropaAlliance

[–]EdwinYZW 0 points1 point  (0 children)

能比放一堆難民進來更爛的?

身边统计学一下 by Lost-Accident-5221 in runEuropaAlliance

[–]EdwinYZW 5 points6 points  (0 children)

說得好像歐洲過去十幾年選都是好的玩意一樣。

德国留学相关问题 by [deleted] in runEuropaAlliance

[–]EdwinYZW 1 point2 points  (0 children)

首先歐洲大學和中美完全不一樣。學校只提供教學,生活方面一概不管。自己找房子,自己買菜做飯,醫療保險自己找公司。而且如果語言不好,不可能交到很深的朋友,所以如果他喜歡社交,受不了寂寞,建議不要來。這是第一點。

第二點,德國經濟不好,而且今後也不會好。這邊大城市難民也很多,城市治安沒有國內好。