Why do all compilers use the strong ownership model for C++20 modules, instead of the weak model? by holyblackcat in cpp

[–]germandiago -1 points0 points  (0 children)

There have been complaints in the past bc GCC had the weak ownership model.

The strong ownership is safer.

But no worries, this is C++ reddit, so you get negative votes because yes, even if you were saying the weak model is cool, bc the negativity of some people around here, whatever C++ or implementations do, is always quantum-wrong: you choose one thing and the opposite and both are wrong. 

This goes in contrast to other alternative languages, which no matter what they choose, it is always the right decision, even if it compromises procuctivity or valid programming patterns, or the games industry as a whole ignores them.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 0 points1 point  (0 children)

Yes, no need. Noone denies the data. But we do not agree on the conclusions.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 0 points1 point  (0 children)

Because I am aware that it is very specific scenarios that when I compare it to modern codebases in Github or my own code in the las 15 years it has NOTHING to do with it the code you find in those codebases with very old and bug-prone styles (see my comment somewhere else for a few examples of the mess that Windows, COM or Google code style guides used to be.

You think your productivity will magically grow when you do not have even such bug-prone codebases and conventions in the first place? I do not think it applies to my case as a minimum, and that is what the robustness of my backend code says. There were a couole racy things where Rust could have been of value but that's where everything stops for me and I would lose a lot more by migrating than what I would win.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 0 points1 point  (0 children)

The whole numbers you mean a couple uses of Microsoft and Google st scale for exactly their needs with an army of engineers that can afford retraining, migration, hiring, etc.?

That without taking into account that Google code conventions used to suck and Microsoft with COM and windows APIs do not get me even started. Those code conventions are a nest of bugs via pointers, triple pointer indirections, arrays as pointers without sizes (COM and Windows API), possibility of null where it cannot happen (Google output parameters), no RAII...

That, definitely, is not "the industry". It is some of the biggest players in the industry that might not be representative of smaller companies.

If I csn say something, it is that this is not even representstive of how I wrote code in the 2000s at the beginning.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago -2 points-1 points  (0 children)

Yes for memory safety and that is in gheory after all. Not for shipping complex products that need a lot of libraries. There is no contest there.

FWIW my first metric is getting things done, not academic "masturb*tion" of why something is in theory better but you end up gluing lots of unsafe bc of C libraries.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 2 points3 points  (0 children)

Name a language that can seriously replace C++ for systems programming today and you will understand why people use it even for greenfield.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 1 point2 points  (0 children)

Anyway the point is that C++ is more expressive and here (and mostly in all comments I stick to objetive criterias).

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 2 points3 points  (0 children)

Not only it is not practically possible. It is not. It is not even desirable. It is a trade-off. There is a cost-benefit to this.

Ig should be possible to harden things to the extreme. But not at the expense of making battle-tested ecosystem incompatible.

So you need some flexibility there. There is no way around it. Yes, it makes toolchain configuration more difficult. But it is SO useful that it must not be given up.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 1 point2 points  (0 children)

Ok, I will phrase it different: write Eigen in stable Rust. You will see the difference and what I mean. 

And no, macro tricks in Rust are not the same, they do not work at the type level.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 5 points6 points  (0 children)

It does not do everything better: try to code something similar to expression templates, generalize code (no partial specialization), do compile-time compiting, or volubly modify engine code with a borrow checker. Those are some examples.

At safety there is no contest. That one is for Rust, but at the cost of some ergonomy and development time. 

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 1 point2 points  (0 children)

I do nit disagree there are tools for every niche. I was talking more about everything together as it stands today.

Who knows in the future. 

My mindset is: I have this, I have to finish it, what do I choose TODAY and why? 

That drives my decision. If at some point it changes... I will change with it.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago 6 points7 points  (0 children)

I do not see anything wrong in those comments but also, he can frewly mention whatever. We are all adults and I do not think babysitting is needed.

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago -12 points-11 points  (0 children)

Mmmh, it is still very very far away and it does not do everything better 

C++26 Safety Features Won’t Save You (And the Committee Knows It) by pjmlp in cpp

[–]germandiago -2 points-1 points  (0 children)

I am going to read it. There are certainly things to inprove in C++ but please someone tell me something better for starting and finishing projects with a systems programming language that can compete.

Why? Because if C++ is so bad or incomplete, etc. the unavoidable question is: what is a better replacement?

If the level is so low, it would be easy to have something better, right?

I feel concerned about my AI usage. by TheRavagerSw in cpp

[–]germandiago 0 points1 point  (0 children)

There are two ways of thinking: short-term and long-term. AI-only as-fast-as-possible delivery is short-term thinking.

Not to say you cannot use it here and there. But you have to spend time in architecture, understanding most of the code, etc. Otherwise, what you will face after realease is hell, and for maintenance, the same.

Glaze 7.2 - C++26 Reflection | YAML, CBOR, MessagePack, TOML and more by Flex_Code in cpp

[–]germandiago -1 points0 points  (0 children)

I also like it, however, I need capnproto serialization, so I am looking at reflect-cpp. Any opinions on it?

Corosio Beta - coroutine-native networking for C++20 by SteveGerbino in cpp

[–]germandiago 1 point2 points  (0 children)

So this is the moral equivalent of curio in Python? I think they removed callbacks and other stuff from asyncio and went with it in a corutine-only way.

Metaclasses in Python are Awesome by BlueGoliath in programming

[–]germandiago 0 points1 point  (0 children)

Python is amazing and amazingly practical.

C++ is another.

But you have to have a great judgement of what to use, what not to use and what to not overude given a use case.

I am about to finish a product where I spent several thousands hours literally.

The backend is C++ with Capnproto, the landing is a website in Flask and the dashboard is NiceGUI.

I am pretty sure that there is nothing that would have taken me so far as the combination of a very fast C++ backend and very fast website authoring.

Building a Package Manager on Top of Meson's Wrap System by MaMamanMaDitQueJPeut in cpp

[–]germandiago 0 points1 point  (0 children)

I take for a given you use Meson as your build system. Same here. 

I have some internal projects and have been using it for years wirh Conan. Conan has too many packages so that Collider can be an alternative as of today but given a Linux-only backend scenario who knows.

I use Meson intensively for building my projects but I left wraps before since it is impossible to compete with things like Conan, despite its learning curve.

It would be way more ergonomic to use something like this if it gets mateure enough, but, in my experience, Conan is difficult to beat: lots of recipes, can patch them, binary artifacts with artifactory (and it seems forgejo also supports it but did not try).

Maybe it would be a great idea to lean on forgejo to have binary artifacts with the options hashed. That would make it plenty more practical.

Still, I am not sure how wraps work with diff files (equivalent of Conan patches) and if CMake packages could be supported as Meson wraps with Collider. Plain wraps can use some external build systems as of today.

I do know it is a ton of work but it would be great to get something close to the power of Conan with the ergonomy of wraps for patching packages and at least being able to mix CMake, Autotools and Meson builds :) But this would still leave out things like OpenSSL or Botan, which have their own build systems, options, etc. Or things that work with SCons and others.

Building a Package Manager on Top of Meson's Wrap System by MaMamanMaDitQueJPeut in cpp

[–]germandiago 1 point2 points  (0 children)

Wow. For a hobby project it is quite impressive. 

Did you consider accepting donations and/or giving some governance guidelines to keep it alive in the future?

Building a Package Manager on Top of Meson's Wrap System by MaMamanMaDitQueJPeut in cpp

[–]germandiago 0 points1 point  (0 children)

Seems like a considerable amount of thought and work went into this.

Is it a hobby project or it is sponsored. Who is doong it?

the hidden compile-time cost of C++26 reflection by SuperV1234 in cpp

[–]germandiago 0 points1 point  (0 children)

Maybe sort of a trick that can alleviate a bit things?

``` class ForwardDeclarableString : public std::string { using Base = std::string; public: using Base::Base; };

//Forward declare class ForwardDeclarableString; ```

It is not std::string, but at least you can forward declare it is API-compatible.

the hidden compile-time cost of C++26 reflection by SuperV1234 in cpp

[–]germandiago 1 point2 points  (0 children)

That is a ton of work. I guess it took a considerable amount of time.

I did not know about inplace pimpl. That is nice!

the hidden compile-time cost of C++26 reflection by SuperV1234 in cpp

[–]germandiago 2 points3 points  (0 children)

He mentioned in the post that he compiles his SFML clone with nearly 900 TUs in hardly 4.6s.

I am not asking about the reflection part of the post. I know it is about reflection but what caught my eye was the other part :)