▲ | sunshowers 5 days ago | |||||||||||||||||||||||||||||||||||||
Exactly! This is my problem with the C++ community's culture. At no point is safety put first. | ||||||||||||||||||||||||||||||||||||||
▲ | Yoric 5 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
Yeah, it's great that the C++ community starts to take safety in consideration, but one has to admit that safety always comes as the last priority, behind compatibility, convenience, performance and expressiveness. | ||||||||||||||||||||||||||||||||||||||
▲ | StillBored 5 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
Its worse. The day I discovered that std::array is explicitly not range/bounds checked by default I really wanted to write some angry letters to the committee members. Why go through all the trouble to make a better array, and require the user to call a special .at() function to get range checking rather than the other way around? I promptly went into my standard library and reversed that decision because if i'm going to the trouble to use a C++ array class, it better damn well give me a tiny bit of additional protection. The .at() call should have been the version that reverted to C array behavior without the bounds checking. And its these kinds of decisions repeated over and over. I get its a committee. Some of the decisions won't be the best, but by 2011 everyone had already been complaining about memory safety issues for 15+ years and there wasn't enough politics on the comittee to recognize that a big reason for using C++ over C was the ability of the language to protect some of the sharper edges of C? | ||||||||||||||||||||||||||||||||||||||
|