Hacker News new | past | comments | ask | show | jobs | submit login

I don't think those other features are half as compelling as you think they are.



Using both C and C++, each in their place, I actually do think they are.


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.


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.


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: