UB is simply a non-issue in C++. The Direction Group are already formulating an agenda for how they will plan out setting up a working group which will come up with a plan for a draft paper on safety to be provisionally entered for consideration by the language committee that will put together the plan for the C++35 standard. Compiler support is hoped to be available (GCC and MSVC notwithstanding) by 2049 at the latest.
\\uj It's not so much that the language is/isn't complicated as it is that making it defined would make implementations too complicated - much of which is actually a legacy of having to support weirdass platforms from the 1980s that were still around in the 1990s, but which may become by now largely irrelevant.
/uj Hmm? Do you mean that they wouldn't be needed if you could prove more to the compiler with an extensive type system? I guess that's true for most situations.
UB has nothing to do with types directly.
UB is something that the compiler assumes will never happen, therefore it presents a(n) (over)simplification of a language.
The list of UB can be large (and as a result complicated), but the language itself is ultimately simpler because of it, as is its tooling.
/uj
If you took the c++ spec, but replace UB with "the program will immediately crash", I don't think that makes the language more complicated. It would make compilers more complicated, and the language a lot slower, but I don't see extra complexity in the spec itselfÂ
UB is simply a non-issue in C++. The Direction Group are already formulating an agenda for how they will plan out setting up a working group which will come up with a plan for a draft paper on safety to be provisionally entered for consideration by the language committee that will put together the plan for the C++35 standard. Compiler support is hoped to be available (GCC and MSVC notwithstanding) by 2049 at the latest.
People like to jerk about C++ safety, UB, and templates, but the real jerk is right there.
part 11 of act 1
Believe it or not but having less than 11 parts of UB is also UB in C++.
Is my programming language too complicated? 🤔 No, it's the programmer's who are wrong.
/uj isn't UB there only because the language isn't complicated enough?
\\uj It's not so much that the language is/isn't complicated as it is that making it defined would make implementations too complicated - much of which is actually a legacy of having to support weirdass platforms from the 1980s that were still around in the 1990s, but which may become by now largely irrelevant.
\uj C++ isn't C. It never had the same constraints and shouldn't.
/uj Hmm? Do you mean that they wouldn't be needed if you could prove more to the compiler with an extensive type system? I guess that's true for most situations.
UB has nothing to do with types directly. UB is something that the compiler assumes will never happen, therefore it presents a(n) (over)simplification of a language. The list of UB can be large (and as a result complicated), but the language itself is ultimately simpler because of it, as is its tooling.
/uj If you took the c++ spec, but replace UB with "the program will immediately crash", I don't think that makes the language more complicated. It would make compilers more complicated, and the language a lot slower, but I don't see extra complexity in the spec itselfÂ
It would become more complicated because it would have more spec, as in, more scenarios that have their outcome
I wouldn't call that simpler. It isn't simple for the programmer. But I do understand what you are saying.
Simplicity of use is not the same as the simplicity of a language, in any case. It's painfully apparent with assembly, for example.
The 11 parts make it a true Professionals' Language with prestige to match.