News for hackers. Stuff that matters.
Re:C and C++ Aren't Future Proof by zxcdw on Sunday January 20, 2013 @06:31PM (#5088765)
If all people started writing code in a modern C++ equivalent called Rust this would be a better world. After all in comparison Rust is safe by nature unlike C or C++. :)
Re:C and C++ Aren't Future Proof by CJefferson on Sunday January 20, 2013 @07:01PM (#5088876)
Really? I should switch my apps from C++ to an unfinished language?

I'll consider once the Mozilla foundation have written any application of note in it.

Re:C and C++ Aren't Future Proof by zxcdw on Sunday January 20, 2013 @07:12PM (#5088925)
You should not switch your apps. You should stop creating new projects in C++ once Rust is mature enough for your liking.

The fundamental "problem" we're having/facing with C and C++ is the investments we've put in. Lots of "infrastructure" in modern day computing relies on C and C++ and will do so for ages. We can't just drop the projects and switch to something else(say Rust or maybe Go), but we can stop creating new C and C++ codebases to alleviate the problem for the future.

Re:C and C++ Aren't Future Proof by eropple on Sunday January 20, 2013 @09:55PM (#5089576)
No, we can't, because Go is unacceptable (garbage collection) and Rust is no better than a figment until all of the libraries I need exist in it.

And I have better things to do than port them, because C++ doesn't bother me.

Re:C and C++ Aren't Future Proof by shmerl on Sunday January 20, 2013 @09:58PM (#5089585)
Exactly, it's a chicken and egg problem. C++ has tons of libraries, while Rust has barely any. Rust can use external C bindings, but not C++ ones yet. I think if they solve the issue of using C++ libraries from within Rust, the transition will be much easier, and meanwhile more native Rust libraries will be created.
Re:C and C++ Aren't Future Proof by rplacd on Monday January 21, 2013 @01:37AM (#5090258)
Is the C++ ABI issue ever going to be solved?
Re:C and C++ Aren't Future Proof by pjmlp on Monday January 21, 2013 @03:21AM (#5090503)
Yes, in the cases where the operating system is done in C++.

The C ABI is the operating system ABI and it is only ubiquitous in operating systems done in C. Other operating systems use whatever ABI the system offers.

Re:C and C++ Aren't Future Proof by shmerl on Monday January 21, 2013 @01:53AM (#5090306)
That's part of the problem they are facing. C is much easier to deal with.
Re:C and C++ Aren't Future Proof by jhasse on Sunday January 20, 2013 @07:52PM (#5089097)
My new projects rely on C++ libs, so I can't use Rust.
Re:C and C++ Aren't Future Proof by roel_v on Monday January 21, 2013 @04:16AM (#5090650)
How many Rust libraries are there for various tasks? What IDE supports Rust? What tutorials, books and conferences exist that teach and distribute the state of the art in development techniques? What example projects have been build in it to demonstrate its feasibility for large projects? What tools support Rust (continuous integration, code formatting/checking, build tools, ...)?
Re:C and C++ Aren't Future Proof by wbl on Monday January 21, 2013 @10:30AM (#5091867)
I'm sure make and git work with Rust like anything else.
Re:C and C++ Aren't Future Proof by roel_v on Tuesday January 22, 2013 @03:08AM (#5096115)
Well using make as an example of anything good is... let's say 'suspicious'. There is more to tooling than make and git (note that I deliberately omitted version control from my list)
Re:C and C++ Aren't Future Proof by jfb on Sunday January 20, 2013 @07:31PM (#5089028)
While switching now isn't feasible, keep in mind the sunk cost fallacy.
Re:C and C++ Aren't Future Proof by cwzwarich on Sunday January 20, 2013 @07:42PM (#5089070)
Has any interesting large program been written in Rust besides the Rust compiler itself?
Re:C and C++ Aren't Future Proof by kibwen on Sunday January 20, 2013 @09:47PM (#5089546)
Not really. The closest is Servo,[1][2] the massively-concurrent browser engine that the language was designed to create. But it's not very featureful yet, and is only a few thousand lines (compared to 100+ kloc for the Rust compiler itself).

[1] https://github.com/mozilla/servo

[2] https://github.com/mozilla/servo/wiki/Design

Re:C and C++ Aren't Future Proof by dysoco on Sunday January 20, 2013 @07:12PM (#5088923)
I'm also looking foward to Rust, but it's not "here" yet :P
Re:C and C++ Aren't Future Proof by kibwen on Sunday January 20, 2013 @09:44PM (#5089529)
It's too early yet to make claims like that. Rust may or may not end up supplanting C++ in some areas, but even in the most optimistic case it definitely won't obviate C++ entirely.
Re:C and C++ Aren't Future Proof by drivebyacct2 on Sunday January 20, 2013 @07:56PM (#5089118)
I've been working my way through the Rust tutorial. As much as I like the power and control it gives me, they really need to take a note from Go on the syntax. Some of the even fairly contrived examples are an eye-sore. I need to give it more time but yeesh there's a lot of syntax to look out for.
Re:C and C++ Aren't Future Proof by kibwen on Sunday January 20, 2013 @09:49PM (#5089552)
Can you give some specific examples? I myself have been known to bikeshed with the Rust devs on occasion. :P
Re:C and C++ Aren't Future Proof by zxcdw on Monday January 21, 2013 @02:00AM (#5090323)
Not exactly related to syntax, but one of the issues I've found with following the tutorials is that there is only a handful working programs which actually show the feature in question in use. While I understand that (as the tutorial explicitly mentions) the tutorial is very terse and quick glance at the language features, I feel it could be improved tremendously if there was even one a few line fully compilable program exploring the features per section.

Then again I also understand that because the language changes and evolves, maintaining more code in the docs means more effort. However, this is one of the few things I've felt bugging me as an end-user. Of course I believe this can be expected to change for the better in the future as the language matures and stabilizes, but I figured I'd voice this out given this perfect opportunity. :)

Re:C and C++ Aren't Future Proof by kibwen on Monday January 21, 2013 @08:55AM (#5091440)
That's a good idea, but it's going to require a bit of thought to implement. It might make sense to have an "advanced examples" external page for every section in the tutorial, which would sort of transform the current tutorial into an annotated table of contents. Which could be really neat! But perhaps it should wait until Rust has some analogue to play.golang.org available.