C++ Core Guidelines
github.com
C++ Core Guidelines
1–10 of 115 posts
Re: C++ Core Guidelines
#2Re: C++ Core Guidelines
#3Presumably the alternatives to a standardized, intrinsically unsafe interface are either a standardized, safe interface, which would require introducing safe alternatives for unsafe elements like std::shared_ptr and raw pointers. Or a more felixible interface standard. For example, making your public functions function templates when necessary.
[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus#safercplusp...
[2] https://github.com/duneroadrunner/SaferCPlusPlus#the-problem...
Re: C++ Core Guidelines
#4Discussed in 2015: https://news.ycombinator.com/item?id=10239962
Re: C++ Core Guidelines
#5Discussed in 2015: https://news.ycombinator.com/item?id=10239962
It's a permalink. The document itself seems to have been updated quite a bit since 2015.
Re: C++ Core Guidelines
#6[1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
Re: C++ Core Guidelines
#7I actually really liked the way Apple did it for Objective-C. Don't use exceptions unless something is really going sideways, instead use NSError. I'm not saying this is the correct pattern for C++, but I don't personally think exceptions are the correct pattern either.
Re: C++ Core Guidelines
#8I wish they were more specific about when to use and not use exceptions. Truth be told I really hate exceptions and I strongly feel that they should only be used in the most disastrous situations. I'm messing with the 0MQ C++ wrapper now (which I will probably move off of) and they use exceptions for freaking everything. For example the send(msg) method returns true if the message is sent, false if EWOULDBLOCK is ret…
Re: C++ Core Guidelines
#9I wish they were more specific about when to use and not use exceptions. Truth be told I really hate exceptions and I strongly feel that they should only be used in the most disastrous situations. I'm messing with the 0MQ C++ wrapper now (which I will probably move off of) and they use exceptions for freaking everything. For example the send(msg) method returns true if the message is sent, false if EWOULDBLOCK is ret…
Do you have any examples in mind where it's unclear to you whether an exception would be appropriate?
Re: C++ Core Guidelines
#10I wish they were more specific about when to use and not use exceptions. Truth be told I really hate exceptions and I strongly feel that they should only be used in the most disastrous situations. I'm messing with the 0MQ C++ wrapper now (which I will probably move off of) and they use exceptions for freaking everything. For example the send(msg) method returns true if the message is sent, false if EWOULDBLOCK is ret…
The way ObjC did it is to use exceptions to signal programmer error, and error objects for program errors. I think it’s the best style, at least until the day programmer errors just won’t compile , but that needs something like Idris to take over.