News for hackers. Stuff that matters.
Re:Comparing Rust and Java by giancarlostoro on Sunday February 28, 2016 @10:59PM (#11193509)
Have you considered D? It's pretty much supposed to be a successor to C++ and has GC (can be turned off) and is compiled as well. I feel like I'm writing compiled Java when I code in D if that gives you a nicer perspective of D.
Re:Comparing Rust and Java by dikaiosune on Sunday February 28, 2016 @11:18PM (#11193550)
AFAIK, turning off GC in D is not feasible whenever using large portions of the standard library, but there were efforts underway to change that. Do you know if there's been much progress?
Re:Comparing Rust and Java by atilaneves on Monday February 29, 2016 @06:25AM (#11194826)
Lots of progress, but there's still work to do. If the GC is unacceptable for your application, slap `@nogc` on your `main` function and you're guaranteed to not use it.
Re:Comparing Rust and Java by levemi on Monday February 29, 2016 @03:24AM (#11194247)
I'm writing OpenGL code. I know lots of languages claim support for OpenGL, but in my opinion dealing with gpu stuff is something best written in C or C++. All the guides, all the answers to questions, all the popular books, everything out there assumes you're using C or C++ when you're working with GPU code. It's fine. I like using C++ for this. OpenGL in any other language and you're a second class citizen at best.
Re:Comparing Rust and Java by hauleth on Monday February 29, 2016 @06:41AM (#11194880)
Re:Comparing Rust and Java by giancarlostoro on Monday February 29, 2016 @06:37AM (#11194870)
D much like C++ interfaces to C see:

https://dlang.org/spec/interfaceToC.html

D was at one point a C++ compiler but Walter Bright decided to break backward compatibility with C syntactically to allow the language to evolve in ways that C restricts, while still allowing it to interface with C. Sorry if I worded this poorly, but you may want to reconsider D and see for yourself if it feels like a second class citizen or what? There are sample projects interfacing to C projects (LuaD comes to mind).

Re:Comparing Rust and Java by douche on Monday February 29, 2016 @07:14AM (#11194985)
I first heard about D from Gamedev.net, so you can certainly do OpenGL with it. I believe there have even been commercial games written in D.
Re:Comparing Rust and Java by david-given on Monday February 29, 2016 @09:09AM (#11195490)
Kenta Cho's shooter _Torus Trooper_ is written in D and might make a good example. (It's a damn good game, too.)

https://www.youtube.com/watch?v=PJMTQmqxBqg

http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html

Also, ported to Linux: http://www.emhsoft.com/ttrooper/

Re:Comparing Rust and Java by meddlepal on Sunday February 28, 2016 @11:13PM (#11193533)
What is the tooling and library ecosystem like for D compared to Java?
Re:Comparing Rust and Java by Ace17 on Monday February 29, 2016 @01:47AM (#11193961)
D programs can make direct (=zero overhead) calls to C functions (like we do in C++). Which basically means you have access to any C library.

The D standard library is very dense (it makes C++14 standard library look ridiculously incomplete), so most things are available out of the box (threads, processes, filesystem, network, random, algorithms) ... in a portable way.

Re:Comparing Rust and Java by giancarlostoro on Monday February 29, 2016 @12:19AM (#11193718)
There's a Visual Studio plugin available, and I know VS Code has a nice plugin as well ( you need to install certain tools yourself in that case ), as well as other editors with their own feature set. There is also Dub[0] which is a build tool for D and gives you access to all sorts of D packages. I'm still a beginner to D so forgive me if my answer doesn't suffice.

[0]: https://code.dlang.org/getting_started