Alex Rivera | Logout

As Java is to Scala, C++ is to ...?

Asked 2010-12-29T02:17:19.077
23

Although C++0x is quite an improvement to C++ (type inference, anonymous functions, and so on), I have to say that Scala seems even better. The thing is that Scala only runs on the JVM, although it seems like it can also run on top of C#.

Ideally, I would like a language as nice as Scala, but running "on top of" C++ -- using the standard libraries, easily linking against C/C++ object files, the whole deal. I do a lot of numerical programming built of top of well established C/C++ libraries (fast and reliable), and that is not something I can walk away from.

Is anyone of aware of such a language?

Update:

The features I am looking for are:

  • Seamless integration with C/C++ libraries, just like Scala can access Java libraries without the need for bindings to be generated/maintained

  • A strong type system, with a well designed type inference system that keeps me from having to write verbose and redundant type annotations

  • Functional and OO features built into the language, with the support of its own libraries instead of only relying on the standard C/C++ libraries.

It seems like a lot of the clang/LLVM work being done right now may facilitate work along these lines, but it would be nice to find that something like this is already being worked on.

Edit
Report

2 Answers

1

Have a look :

D Programming Language

answered 2012-04-06T10:22:34.613
1

I'm looking for the same thing. Lua and D are two options. lua has a command line interpreter, luajit is fast, and for math I use gsl shell. D is more sophisticated but still simple to use. D is also as fast as C++.

answered 2012-04-12T21:59:50.297

Your Answer