News for hackers. Stuff that matters.
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by evincarofautumn on Sunday September 01, 2013 @10:55PM (#6313240)
> In a not-that-near future, C++ will die of ugliness

I am so excited for that day. There are some really amazing upcoming languages positioning themselves to replace C++ for new applications. Rust seems to be in the best spot right now; Nimrod is also pretty compelling.

Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by z3phyr on Monday September 02, 2013 @04:39AM (#6314111)
That day might never come. Good things of rust will eventually make their way into newer C++ standards. The industry largely depends on C/C++, and switch to other languages is getting out of the comfort zone.
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by glennsl on Monday September 02, 2013 @07:01AM (#6314539)
You might get some of the good stuff, but you won't get its killer feature, robustness, without sacrificing backwards compatibility. And that's not going to happen.

Eventually we have to move on to more robust programming languages where null pointers and pointers to freed memory are not allowed.

Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by mden on Monday September 02, 2013 @01:30AM (#6313577)
Out of curiosity, in what ways is Rust that much less uglier than C++? I've only looked through the docs and the code provided and it seems to be riddled with the same type of "ugliness" inherent to C++ - namely the ugliness symbolized by the need for all of the special characters like * and &. It seems like Rust has some nice syntax for pattern matching, but what else?
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by evincarofautumn on Monday September 02, 2013 @02:44AM (#6313756)
Syntax is undoubtedly important, but primarily as a means of elegantly expressing the unique semantics of a language. The visible ugliness is the language being explicit about low-level details.

So what else? Rust isn’t a huge innovation in terms of language features, but it does take advantage of relatively recent advances in language design (e.g. typeclasses) and has an excellent combination of defaults. The important ones are memory safety, an ownership model (think unique_ptr/shared_ptr), immutability, and isolated lightweight threads.

Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by mercurial on Monday September 02, 2013 @05:03AM (#6314195)
Well, it also handles lifetimes, which is certainly a huge improvement in terms of safety, though it comes at, shall we say, syntactic cost:

  pub fn to_rigid_body_or_fail<'r>(&'r self) -> &'r RigidBody<N, LV, AV, M, II> {
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by nnethercote on Monday September 02, 2013 @02:31AM (#6313732)
You're only thinking about syntax. Look deeper.
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by wicknicks on Monday September 02, 2013 @12:22AM (#6313442)
I'm hoping for a not-that-far future ... Jokes apart, does Rust perform as well as C++?
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by evincarofautumn on Monday September 02, 2013 @12:30AM (#6313457)
Anecdotally yes, within a few percent, depending on what you measure. Safe code tends not to perform as well as unsafe code, but this is also true in C++—most applications just tend to err (and I mean err) on the side of performance.
Re:Nphysics – 2 and 3-dimensional rigid body physics engine ... by sanxiyn on Monday September 02, 2013 @03:18AM (#6313861)
The difference is that in Rust you can write unsafe implementation of safe interface. In C++ you cannot specify safe interface. (You can and should document memory management assumptions in C++, but C++ compiler does not enforce such documentations.)