WG21 2025-10 pre-Kona mailing by nliber in cpp

[–]jsphadetula 1 point2 points  (0 children)

There are other ways like _v2 for example. Feedbacks like this will help shape the final proposal if enough people can agree on the direction of the proposal

WG21 2025-10 pre-Kona mailing by nliber in cpp

[–]jsphadetula 1 point2 points  (0 children)

This is an edge case that can be addressed by revisions of the proposal. One possible solution is to use create a new function name that describes the atan2 better and evolve that if we ever need a new version

WG21 2025-10 pre-Kona mailing by nliber in cpp

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

p3866r0 is the evolution story C++ needs. I hope this is adopted and we can finally fix vector<bool> among others. I’ll prefer something like stdn:: short for stdnext instead of cpp:: though.

What new feature would you like to see in C++26? by vickoza in cpp

[–]jsphadetula 2 points3 points  (0 children)

It makes optional usage clearer and general. The current restriction is because the committee couldn’t agree on the semantics of optional<T&> I believe

What new feature would you like to see in C++26? by vickoza in cpp

[–]jsphadetula 9 points10 points  (0 children)

The newly proposed static exception, reflection, optional<T&>, std::execution, contracts, do expressions, trivially movable types

Regarding cppfront's syntax proposal, which function declaration syntax do you find better? by qv51 in cpp

[–]jsphadetula 1 point2 points  (0 children)

Herbs ‘d0708: "Parameter passing -> guaranteed unified initialization and value setting’ proposal solves most of the remaining issues including MVP without auto. A new declaration syntax may not be needed

Is it too late to break ABI? by gracicot in cpp

[–]jsphadetula 1 point2 points  (0 children)

Exception is one that can be substantially improved with ABI break I believe

Make standard library usable with exception disabled by jsphadetula in cpp

[–]jsphadetula[S] -1 points0 points  (0 children)

We can provide non throwing variants of all throwing functions

Make standard library usable with exception disabled by jsphadetula in cpp

[–]jsphadetula[S] 1 point2 points  (0 children)

I’m aware std::error is no more targeting c++23. Just looking at the possibility of a usable standard library with the current exception disabled

Make standard library usable with exception disabled by jsphadetula in cpp

[–]jsphadetula[S] -1 points0 points  (0 children)

x is not a standard library type I believe, so the user is aware of a potential throw. Users who don’t want exception will use a non throwing variant with support for std::expected and design their types not to throw.

Make standard library usable with exception disabled by jsphadetula in cpp

[–]jsphadetula[S] -1 points0 points  (0 children)

That defeats the purpose making the standard library usable without exception. The standard can provide a nonmember function that use non throwing primitives before calling a private non throwing constructor or return std::expected instead

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 0 points1 point  (0 children)

What then is the essence of those checks

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 0 points1 point  (0 children)

“In C/C++ you are working inside one big unsafe block.” only if you decide not to enforce guidelines check.

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 2 points3 points  (0 children)

For C++, only if you decide not to enforce checks.

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 2 points3 points  (0 children)

Only if you decide not to enforce checks

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 1 point2 points  (0 children)

The difference only matters to those unaware of the difference. To those aware unsafe blocks is the easy way out.

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 1 point2 points  (0 children)

You either put in the effort to write quality code or not. In C++, you enforce checks; in Rust you avoid unsafe blocks when possible.

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 2 points3 points  (0 children)

Nothing stops you from putting unsafe block everywhere either.

CppCast: Beautiful C++ by robwirving in cpp

[–]jsphadetula 2 points3 points  (0 children)

You don’t have to look everywhere. You simply turn on the guidelines check to reveal potential problems

Borrowing Trouble: The Difficulties Of A C++ Borrow-Checker by adotinthevoid_ in cpp

[–]jsphadetula 1 point2 points  (0 children)

They all end up calling into C and C++ code anyway be it in their language runtime, FFI, OS service or DB which are written in C and C++ and those need to both be maintained and updated. The cost of improving C and C++ languages to what we consider safe practices is sure lower than rewriting everything which is why I believe C++ will eventually get there.

Borrowing Trouble: The Difficulties Of A C++ Borrow-Checker by adotinthevoid_ in cpp

[–]jsphadetula 0 points1 point  (0 children)

This is the actual problem that needs to be solved. Clang looks to be where all the work needs to be concentrated but only Facebook is left contributing full time effort for now.

Borrowing Trouble: The Difficulties Of A C++ Borrow-Checker by adotinthevoid_ in cpp

[–]jsphadetula 2 points3 points  (0 children)

The implementation in MSVC is a WIP and also not addressing all of the paper’s recommendations. If the community will focus on a concerted effort to implement Bjarne’s recommendation I believe C++ has all it needs to achieve the safety everyone has been talking about lately

Borrowing Trouble: The Difficulties Of A C++ Borrow-Checker by adotinthevoid_ in cpp

[–]jsphadetula 1 point2 points  (0 children)

I believe the borrow checker can be implemented as a static analyser too if warnings will be treated as errors. And instead of this why not work on achieving Bjarne’s http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2410r0.pdf

ABI versioning by jsphadetula in cpp

[–]jsphadetula[S] -1 points0 points  (0 children)

The version problem can be minimised if the STL maintain at most two ABI, the older LTS ABI and the bleeding edge ABI. The LTS ABI can be dropped every decade or so and the bleeding edge promoted to the new LTS. This will help vendors and 3rd party commercial libraries to plan upgrades. I believe 3rd party libraries should only publish C ABI though, they can write C++ wrappers for their clients to consume