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?
[ Parent
| on HN ]
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.