Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except that even the C++ hello world uses most features of the language:

* C-like functions (main)

* headers (iostream)

* namespaces (std)

* operator overloading (<<)

* object-orientation (cout is an instance of a class that is derived from ios and ios_base)

* templates (endl is a template function)



I don't think it's correct to characterize the C++ hello world as using object-orientation or even templates. There's no template syntax in it, for example.

It does use that one predefined object std::cout and its overloaded operator. But other than that plus namespaces, it's not using features that aren't available in C.

I disagree that it uses most features of the language, at least not in any direct or visible way. There are a lot of features it doesn't use.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: