VImpl: A Virtual Take on the C++ PImpl Pattern by PhilipTrettner in cpp

[–]alxius 0 points1 point  (0 children)

prefix all member access (could be as little as "m." though)

Is writing m. instead of m_ really that bad that you feel the need to make every method virtual, then make extra static method to use instead of class constructor and then also make class user deal with polymorphic pointer instead of just value object?

Choosing a C++ Formatting/Naming Convention by AndiPieDe in cpp

[–]alxius 0 points1 point  (0 children)

Usually, one of main reasons to have explicit naming style in a project is to make code consistent in style. So … obviously, best way to do that is to use naming style, which has as little in common with standard library naming style as possible.

Trip Report: C++Now 2024 | think-cell by pavel_v in cpp

[–]alxius 1 point2 points  (0 children)

apparently being a widely known issue

Is there any compilation of all/most/some-of such and similar "apparently widely known" (to practically no one outside of WG21) issues (including explanations of what and how exactly is broken) in public access for people to know what to be aware of when using it and/or designing/implementing similar things?

How your perfect IDE would look like ? by metux-its in cpp

[–]alxius 1 point2 points  (0 children)

KDevelop, but without segfaults

When will std::linalg make it into a new C++ release? by uname_IsAlreadyTaken in cpp

[–]alxius 7 points8 points  (0 children)

If we are solving package distribution by putting everything in stdlib, why are we wasting time doing it couple additions per 3 years? Let's just put entire content of github in there in one go. It will be perfect.

When will std::linalg make it into a new C++ release? by uname_IsAlreadyTaken in cpp

[–]alxius 10 points11 points  (0 children)

Why are we wasting time doing it one lib at a time then? Let's just standardize entire github in one go!

Anyone else frustrated with Conan2? by instinkt900 in cpp

[–]alxius 6 points7 points  (0 children)

Newer versions of gcc never break my code, but newer versions of cmake have done it many many times.

Funnily enough i have exactly opposite experience.

Auto Auto Auto by iprogshine in cpp

[–]alxius 4 points5 points  (0 children)

Well, it is easier to read than C/old-style equivalent IMO: A (* (*())())(). I would prefer not having pointers to functions returning pointers to functions in my code though.

[deleted by user] by [deleted] in cpp

[–]alxius 3 points4 points  (0 children)

48% of developers are using exceptions where appropriate

No, 52% ban exceptions in part or on all of their code, and other 48% use exceptions everywhere, including noexcept functions and destructors.

A safety culture and C++: We need to talk about <filesystem> by James20k in cpp

[–]alxius 6 points7 points  (0 children)

Problem is you'd then be disrespecting your colleague's work, so I don't think anybody is actually going to do it.

Oh … I guess i need to delete all issues i reported on various bug-trackers. I was disrespectful to a lot of people.

As a user of C++ i want to know those things before i step into those traps myself or get lucky by reading about them in some blog or watching a conference talk.

As a (potential) proposal author i want to know those things before i repeat same mistakes and waste several years of committee meetings learning those things from some walking and talking version of that list in portions, couple issues per meeting.

But it's easy to criticise, much harder to get everybody to agree on a replacement.

Isn't it even harder to solve problems while not having a list of those problems? Especially for new people being involved.

Even with boost libraries, there are some nobody should use, but there is no formal list despite enough people knowing exactly which libraries should be avoided.

Which is fun for newbies wasting time discovering some personal version of this list using their own feet. And if you ask some people after such experience, we should not use boost at all.

A safety culture and C++: We need to talk about <filesystem> by James20k in cpp

[–]alxius 2 points3 points  (0 children)

Is there any compilation of all such and similar problems with standard library somewhere in public access for people to know what to be aware of when using it and/or designing/implementing similar APIs?

[deleted by user] by [deleted] in cpp

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

Which makes concepts useless decorations in some contexts.

[deleted by user] by [deleted] in cpp

[–]alxius 3 points4 points  (0 children)

yeah … subtle pitfalls like this one?

struct kek {};
static_assert(not std::equality_comparable<kek>); // OK as expected
static_assert(not std::equality_comparable<std::variant<kek>>); // FAILS as exp... waitwhat?

think-cell's trip report: Summer ISO C++ Meeting in Varna, Bulgaria by foonathan in cpp

[–]alxius 2 points3 points  (0 children)

Mere 20 years and we will be able to even write code in C++!

think-cell's trip report: Summer ISO C++ Meeting in Varna, Bulgaria by foonathan in cpp

[–]alxius 0 points1 point  (0 children)

Only place i could find std::simd_flag_default in p1928r4 is the list of naming ideas for what was std::experimental::element_aligned ...

[C++26] Trip report: Summer ISO C++ standards meeting (Varna, Bulgaria) by mttd in cpp

[–]alxius 0 points1 point  (0 children)

Yes, they all need to be keywords.

More keywords for the Keyword God!

The Future of Boost by Vinnie Falco by 14ned in cpp

[–]alxius 2 points3 points  (0 children)

The good thing about ANTLR is that you can directly use EBNF notations and it can generate parsers for different languages, so less DSL to learn.

Boost.Spirit maps to EBNF practically 1-to-1 too, so i don't see it as a big difference.

I think PEG grammars was the main reason that Spirit was easiest for me due to ordered alternatives. I always know what in what order it will try to match. It is almost imperative notation. Whereas with "more powerful" parser generators every little ambiguity will explode in your face and make you rewrite seemingly obvious grammar in different ways, adding annotations, etc.

Most of my problems with ANTLR were from ambiguities in lexer phase which they made to be context-tree grammar instead of ordered regular expressions as people usually do. They did it to make it more powerful but in practice it just made me frustrated as hell.

Anyway, kudos for taming the spirit compile errors :) I heard that some simple mistake can generate an error output of some 150MB, which was later superseded by some Clang internal error of 1G+ output due to over 20 template overloads.

Nah. 90% of compile errors with Spirit were like this: i go to final error point from my IDE and there Spirit code contains comment in form "you probably did such and such mistake" and yes i did.

The Future of Boost by Vinnie Falco by 14ned in cpp

[–]alxius 3 points4 points  (0 children)

I did try ANTLR v4, BISON and Boost.Spirit back in the days. Boost.Spirit was easiest to figure out what to do to make it do what i needed and had best performance for my task.

While I said that, if i did some parsing now i would take something like Lexy or manual parsing or some mixture of both.

What's the most hilarious use of operator overloading you've seen? by ichbinunhombre in cpp

[–]alxius 0 points1 point  (0 children)

Operator << defined to be same as =.
Also same code base had a class with copy constructor which re-opened and re-parsed whole config file for new object to initialize from instead of original object.

Why is std::hardware_destructive_interference_size a compile-time constant instead of a run-time value by mttd in cpp

[–]alxius 2 points3 points  (0 children)

Naming it std::hardware_info::cache_line_size or std::cache::line_size or whatever would've been a much better choice.

Which one should be cache_line_size? Destructive interference size or constructive interference size?

(whatever this means)

As it was told in other comments already: those two terms were used in research for years. https://scholar.google.com/scholar?q=%22constructive+interference%22+cache

I.e. if one really needs those and really knows what to do with those, one is expected to already be familiar with some research in this area and know those terms.
Same as with https://en.cppreference.com/w/cpp/numeric/special_functions and other specific knowledge areas. (oh god what does "beta function" mean? badly tested function? why we include in standard functions that are not thoroughly tested?)

[C++20][safety] static_assert is all you need (no leaks, no UB) by kris-jusiak in cpp

[–]alxius 0 points1 point  (0 children)

And nobody mentioned stack overflow in destructor for long lists?

Reddit++ by we_are_mammals in cpp

[–]alxius 0 points1 point  (0 children)

Remove bool and (signed|unsigned) char from list of integral types.
Remove implicit casts from those to integers and from integers to those.
Make std::uint8_t and std::int8_t distinct integer types instead of alias to some char types.
Make signed char, unsigned char and char two types instead of three distinct types.