News for hackers. Stuff that matters.
Re:Initialization in C++ is Seriously Bonkers by int_19h on Saturday January 05, 2019 @09:54PM (#18836226)
A better idea is to force the initializer, and require some special syntax if you really want an uninitialized variable. E.g. if a language uses underscore as a syntactic wildcard, then it could be something like:

   int x = _;
The vast majority of variables can and should be initialized when they're declared (and often don't ever change after, so const is a good idea too). This is especially so in C++, which is less likely to return values via references/pointers these days (with tuples and uniform init for returning structs).

There are no comments on this comment yet.