Re:Modern C++ gamedev: thoughts and misconceptions
by wbradley on Saturday May 16, 2020 @08:31AM
(#23202870)
Here's a link to the named parameters spec. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n417...
Re:Modern C++ gamedev: thoughts and misconceptions
by MaxBarraclough on Saturday May 16, 2020 @08:30AM
(#23202860)
Named arguments are a good example of a simple feature that C++ still lacks, and cannot be effectively 'faked' without it being built into the language.
Re:Modern C++ gamedev: thoughts and misconceptions
by BubRoss on Saturday May 16, 2020 @12:17PM
(#23204709)
They can be faked to an extent with structs, but the reality of default arguments is that you have to be aware of them anyway so that you don't get behavior you don't expect. When there are default arguments you are building up assumptions and expectations that can become problems when they aren't right.
Named parameters, for instance. It's insane that function parameters still can't be specified in any order with name=value expressions. That would have saved numerous bugs over the years, but apparently I'm the only one who thinks so. When a language such as C++ is harder to use than Verilog, somebody has screwed up badly.