News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by TheMonarchist on Tuesday February 22, 2022 @07:39PM (#30436009)
> Calling Thing::default() clearly communicates that your just getting baseline values and not a lot of magical other initialization stuff going on— with a Thing::Thing() in C++, you're really at the mercy of whatever the project conventions are for how "fat" the constructor is going to be.

In C++ the constructor without arguments is called default constructor. Of course the expectations depend on conventions, but usually it's something from uninitialized garbage to an empty state.

There are no comments on this comment yet.