News for hackers. Stuff that matters.
Re:Ill-Advised C++ Rant, Part 2 (2016) by ender341341 on Wednesday October 25, 2017 @04:56PM (#15554183)
> 7. Binary file includes. Ugh this is just such a dumb idea I can't even. When do you want the file to load? When the executable does? What if you want to read it in chunks? This idea is not well suited for a systems-oriented language

This can be really useful in embedded devices where there is no file system but I don't really see the need for it to be part of the language, every time I've needed it the toolchain came with build tools to handle this.

> 11. Switch/case is stupid. No it's not. You want fall/through cases as well and if you can't see why, don't criticize. This is true in pretty much EVERY language that supports switch/case

a smarter option may have been to require an explicit break or fallthrough keyword but we're a good 40 years late.

>12. Still no strong typedefs. There are! Use the explicit keyword on a constructor definition.

Define a new wrapper class (maybe I'm missing something)? It would be a lot nicer if you could do something like `typedef explicit int FooId;`

Re:Ill-Advised C++ Rant, Part 2 (2016) by Koshkin on Wednesday October 25, 2017 @05:30PM (#15554458)
> Define a new wrapper class

For simple types, for which this makes most sense but from which you cannot inherit, it is a lot of work.

Re:Ill-Advised C++ Rant, Part 2 (2016) by tempodox on Thursday October 26, 2017 @01:01AM (#15556479)
Just to play devil's advocate, you could make a template for defining such wrappers. But then, it might just as well be built into the language for elimination of such boilerplate.