News for hackers. Stuff that matters.
Re:C2x: the next real revision of the C standard by stinos on Monday November 12, 2018 @11:41AM (#18433623)
Using both C and C++, each in their place, I actually do think they are.
Re:C2x: the next real revision of the C standard by Dylan16807 on Monday November 12, 2018 @06:07PM (#18436842)
Then why ever use C if they're that compelling? I'm not really understanding how wanting one little thing from C++ implies diving all the way in.
Re:C2x: the next real revision of the C standard by stinos on Tuesday November 13, 2018 @03:53AM (#18439624)
Then why ever use C

Because some platforms I've used it on did't have proper C++ support. Or because a project I contribute to is already written in C. Or because of limited resources. Etc.

I'm not really understanding how wanting one little thing from C++ implies diving all the way in.

It's just an example of a possible train of thought. And I wouldn't call something like templates 'one little thing'. So suppose there's a choice between both, and no limit on resources etc, and I could go for everything C but templates could make everything easier then just going for C++ instead is an option. Even when not going 'all in' and writing what looks like standard C + template support.

Re:C2x: the next real revision of the C standard by Dylan16807 on Tuesday November 13, 2018 @04:49AM (#18439832)
> And I wouldn't call something like templates 'one little thing'.

Agreed. But templates aren't the one little thing, they're something you said would be 'next'. The 'one little thing' is a way to replace the GOTOs used for releasing resources. I think it's an easy argument that when people are repeatedly building a pattern out of GOTO, there's a gap in the control flow tools that a language gives you.