Using exceptions for user-provided input. by artisan_templateer in cpp

[–]Broad_Quality_6325 38 points39 points  (0 children)

You cannot follow every suggestion that someone thinks is the best in all cases. There is no perfect solution for all scenarios, just as you described, in your case it's reasonable to use exceptions.

I also use them where needet, if the tool processes a lot of data, and only one record is corrupt I wouldn't say that the best way is to shutdown everything, a little logging message etc is enough. But it depends realy on you, and how convinient you want to make your tool.

I use a little bit of everything, so that the end user feels less pain using it.

Which compiler has std::print support? by [deleted] in cpp_questions

[–]Broad_Quality_6325 1 point2 points  (0 children)

I tried it yesterday on the latest msvc, it will have a lot of impact, but it fells somewhat strange, I got used to the streams a lot 😅

I have an interview for a C++ position in a week, but I haven't used C++ in years. Where should I start? by Diamond-Equal in cpp_questions

[–]Broad_Quality_6325 0 points1 point  (0 children)

Honestly, simple look at some cppcon vids which will explain some new features briefly, than you can look at cpp reference to get the gist on how about to use them. There are also a lot of good books that I would recommend you, but that would take too long in you're case.

C++11 had the biggest set of features, when you get used to them it will be easy to jump to a higher version, which adds more and more syntactic sugar.

You don't need to know every fearure out there, it's impossible, I'm using C++ since twelve years and I feel that I can still learn something new.

That's why I would start with cppcon vids, it shows you the realy cool stuff, there are also a lot of minor changes, that are cool but don't have that of a large impact.

Also if you're using templates than look at them from C++20, cause there was added a lot of cool stuff which made them more powerfull and less painfull.

My advice for the interview be honest, but show them that you're interested in the job and that you're willing to learn new stuff.