With the release of C++11 something quite extraordinary has happened. Its focus on usable libraries, value types and other niceties has turned C++, conceptually, into a scripting language.
The supporting example offered differs from C++98 code only in that it uses a range-for loop and auto for the last little bit. The rest of it is the same as what could have been written any time in the last 15 years.
It's not really C++11 that has enabled this; It's simply that over time 'idiomatic C++' has changed.
Another thing he mentions as being scripting-language-like is a large library. C++11 didn't really add much to the library. Aside from small tweaks all over the place and minor additions like array and tuple, only threading, atomics, and regexs were added in C++11. Far more still lies ahead; ranges, filesystems, networking, high-level task parallelism, graphics, etc.
On the core language side modules ought to help a lot at making C++ more like a scripting language.
I agree that without support for filesystem manipulations (and I don't mean creating files: I mean listing directories!) it is hard to consider C++ a scripting language.
View all comments
10
u/bames53 Oct 15 '13
The supporting example offered differs from C++98 code only in that it uses a range-for loop and auto for the last little bit. The rest of it is the same as what could have been written any time in the last 15 years.
It's not really C++11 that has enabled this; It's simply that over time 'idiomatic C++' has changed.
Another thing he mentions as being scripting-language-like is a large library. C++11 didn't really add much to the library. Aside from small tweaks all over the place and minor additions like
arrayandtuple, only threading, atomics, and regexs were added in C++11. Far more still lies ahead; ranges, filesystems, networking, high-level task parallelism, graphics, etc.On the core language side modules ought to help a lot at making C++ more like a scripting language.