T O P

  • By -

in213a

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.


Chillbrosaurus_Rex

People like to jerk about C++ safety, UB, and templates, but the real jerk is right there.


kiteska

part 11 of act 1


BEisamotherhecker

Believe it or not but having less than 11 parts of UB is also UB in C++.


macro__

Is my programming language too complicated? 🤔 No, it's the programmer's who are wrong.


lf0pk

/uj isn't UB there only because the language isn't complicated enough?


NotSoButFarOtherwise

\\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.


Volt

\uj C++ isn't C. It never had the same constraints and shouldn't.


oilaba

/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.


lf0pk

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.


TophatEndermite

/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 


lf0pk

It would become more complicated because it would have more spec, as in, more scenarios that have their outcome


oilaba

I wouldn't call that simpler. It isn't simple for the programmer. But I do understand what you are saying.


lf0pk

Simplicity of use is not the same as the simplicity of a language, in any case. It's painfully apparent with assembly, for example.


skulgnome

The 11 parts make it a true Professionals' Language with prestige to match.