News for hackers. Stuff that matters.
Re:C++ has become a scripting language by Millennium on Wednesday October 16, 2013 @08:16AM (#6559149)
The real differentiator is that there is no user-visible compile step. Scripting languages can be compiled to binary, through a JIT or even AOT, but when this happens, it's hidden from the user. Consider Python and Java: both are compiled to binary formats, but Python hides this while Java does not. It is common to call Python a scripting language, but it has been a long time since anyone said that of Java (and even back when they did, it was intended as an insult more than as a technical classification).

C++ is adopting some of the properties of scripting languages, but I'm not aware of any implementations that have removed the explicit compile step. I don't think it's really accurate to call C++ scripting as long as that step is still required, and I haven't seen very much interest in taking it out.

Re:C++ has become a scripting language by adestefan on Wednesday October 16, 2013 @08:19AM (#6559175)
A little bit of command line foo would fix that. If you really wanted to go gung-ho you could use Linux's binfmt_misc to do it directly to .cpp files for you.

And before you complain it's not the same thing, that's basically all a scripting language does. The compilation step is hidden inside the command wrapper.

Re:C++ has become a scripting language by npsimons on Wednesday October 16, 2013 @02:59PM (#6561432)
Already done: http://www.netfort.gr.jp/~dancer/software/binfmtc.html.en

Also of note: does more than just C/C++: FORTRAN, Java, Pascal, even assembly; and includes a "realcsh" and "realksh" for that C and kernel REPL you've been craving. Just "apt-get install binfmtc". I test out quick little things in C++ with this all the time.

Re:C++ has become a scripting language by outworlder on Wednesday October 16, 2013 @10:41AM (#6559906)
Would it, though? C and C++ introduce a lot of complexity in the compilation stage that are hard to hide without leaking much.

You have to import the headers, using include guards if your "script" spans multiple files. Any external headers have to be in the header search path, libraries have to be explicitly linked and also be in the linker path, you have to have a makefile or similar in order to manage the compilation complexity.

If you are using, say, python, all you have to do is add the shebang, "import" the desired packages and you are good to go. One has to install the eggs, packages, or whatever the name is beforehand, but after that you can just use them.

Re:C++ has become a scripting language by npsimons on Wednesday October 16, 2013 @03:07PM (#6561486)
Eh, it's all semantics; nearly any language can be compiled or interpreted, and while it is verbose, it's not insurmountable to make scriptable C++; I've got some templates I tweaked with long enough to make them pretty straightforward to cut and paste and use with binfmtc (see my other post) to quickly test things (I may have to post those templates . . . ). I also have a template for Python that does similar things, because in all honesty, while it might slow down learning a bit, at least I'm learning the correct way to do things by always having warnings cranked to the max.
Re:C++ has become a scripting language by zeugma on Wednesday October 16, 2013 @08:36AM (#6559275)
There is a C++ REPL called Cling: http://root.cern.ch/drupal/content/cling

It is made by Cern and based on Clang