All completely unsettled law at this point. And, as a general guiding principle, you do NOT want to be one of the people who pays millions in legal fees and court costs to find out, whether you are right or wrong.
1,058 karma · joined November 21, 2022
All completely unsettled law at this point. And, as a general guiding principle, you do NOT want to be one of the people who pays millions in legal fees and court costs to find out, whether you are right or wrong.
If I were you, I would not copy even truly "trivial" amounts of code.
I'm not ashamed to admit that I occasionally ask my LLM to find and fix all the bugs in a file. And not ashamed to admit that it often does. Most usually algorithmic problems, not memory problems, fwiw, because I use modern C++.
Modern best practice for C++ is to crank the warnings to maximum, and to treat warnings as errors. You absolutely should treat linter-like warnings as an error, because they invariably are. So you know.
As part of his training he had to run an advertising campaign for a minor P&G shampoo brand. Training for a finance position, not a product management position! Why would you make somebody in finance handle marketing for a shampoo? Because they need to understand the fundamental mechanics that drive the business. There's no such thing as a good or a bad ad. The only thing that matters is that you flash the name of your product into peoples' primitive lizard brain over and over and over. Pantene, Pantene, Pantene, Pantene. People buy commodity products, and are willing to pay more, solely based on whether they recognize the name or not. Humans have no defense against this.
That time where all the ads I got for months were ads for ridiculously expensive servers, after I had (out of curiosity) googled for "what is the most expensive server you can buy on ebay?"
Or the time when all I got was ads for military-grade cables and connectors for months, after having googled (out of curiosity) for something or another about submarines -- most likely something about the dud submarines that the UK had sold to the Canadian government.
C++20 provides the language feature only, and none of the libraries to use the feature. You can write your own library to use the C++20 feature, but the standard APIs are raw and brutally complex. There are 3rd party libraries to use coroutines, but they are not part of the C++20 standard.
C++23 provides a std::generator, which is indeed a great feature.
Finally, C++26 provides std::execution, and std::task, which finally makes the feature usable with only standard C++ feature, and provides facilities for executing coroutines on thread pools, or message pumps. Significant features and problems have been deferred to C++29.
I guess it's a fair point that coroutines have not been abandoned. But it's alarming that it will now take the better part of a decade for the feature to reach a sensible state (depending on how C++26 gets handled).
Stroustrup's objection of subversion of, and politicization of the "consensus" process seems pretty darned reasonable to me.
And having two major compiler implementers (Clang and Microsoft) among those opposed to the proposal seems like a very poor sort of consensus to me.
The decision to defer how contracts on virtual methods work until C++29 strikes me as particularly horrifying, and renders the feature completely unusable precisely at the point where it most needed (PIMPL classes where public methods are pure virtual, with implementation provided in a private derived class).
And reminds me of c++20 coroutines, for which we are still awaiting a usable implementation. I made the mistake of actually writing a wrapper library for c++ coroutines. A great feature, but only heroically usable in its c++20 incarnation. (I actually did use it in project, but was left wondering why anyone would actually release THAT feature without a supporting class library). Implementation details were shocking, and awful, and insufficiently specified. And I would be completely amazed if my wrapper library continues to work with C++26.
God willing, C++26 will provide an implementation that allows us to sanely use coroutines in message pumps and thread pools soon (such a great feature!), if the standards committee, God Willing, takes the right and good and sensible path of removing contracts from C++26 so that we can get the structured concurrency library.
All in all, I can't help wondering whether the C++ standard doesn't need "Experimental Features" like Java has. It's certainly interesting to see how The Who Must Not Be Named (Oracle) uses experimental features, some of which have existed in experimental status across four or five Java releases. C++20 coroutines and contracts would have been perfect candidates for "experimental C++ features", that can be tested and hardened and have breaking ABI changes made as necessary and appropriate.
> welcome a contracts design that is simple, and “marketed” as just a debug aid
The operative word would be "simple". It's hard to imagine that the feature would require 56 (!!) pages of specifications if the constness rule were omitted. Who the heck ordered that!!??
Yes this! I found it painful to watch abuse being heaped upon obviously junior programmers. Points should have beem award for mentoring those on the path, not gratuitously rejecting their questions.
I tried adding an explicit dual license to the code in my answers; but moderators would any answer that tried to do that.
Not so much that I care about the copyright of my code; but more a question of whether I would find a lawsuit from SO on my doorstep because I had neglected to credit SO for three lines of code that somebody ELSE had contributed to SO. A very real problem, given that SO management after the takeover had shown itself to be not really trustable.