News for hackers. Stuff that matters.
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by darklycan51 on Tuesday August 08, 2023 @10:25PM (#37058036)
Can't wait to need code lawyers because we decided to turn perfectly fine programming languages into common language where its necessary an entire profession to decide if that was what was actually intended when being written or not
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by mianos on Tuesday August 08, 2023 @11:58PM (#37058542)
If you have ever worked in C++, you will find there are numerous Code Lawyers whose main business is to review all C++ for minor C++2030 infractions, missing optimisations and lack of use of the most obtuse language feature when you do things like:

  int ii = 0;
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by MathMonkeyMan on Wednesday August 09, 2023 @04:23AM (#37059989)
I think you meant

    int ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by xy2_ on Wednesday August 09, 2023 @05:08AM (#37060283)
I think you meant

    auto ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by MathMonkeyMan on Wednesday August 09, 2023 @06:14AM (#37060644)
Not at all. I meant

    std::common_type_t<bool, char> ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by mianos on Wednesday August 09, 2023 @08:23AM (#37061576)
Not sure this one is actually valid. You can't infer a type. Maybe in C++40 where types are so 30s?
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni... by MathMonkeyMan on Wednesday August 09, 2023 @10:17AM (#37063011)
C++030 is just next year!