News for hackers. Stuff that matters.
Re:The reference D compiler is now open source by deaddodo on Friday April 07, 2017 @03:26PM (#14062790)
If you plan to learn a systems language for systems reasons (embedded development, compilers, low-level interfaces, etc) then Rust is the pick. No GC and the option to have no runtime (or a very small one, by default).

In other words, if you're looking to replace/supplement your C use: go Rust. If you're looking to replace/supplement your C++ use: probably go D, with some caveats towards actual use.

Note: I like both languages, but do prefer Rust for my personal use cases.

Re:The reference D compiler is now open source by steveklabnik on Friday April 07, 2017 @03:34PM (#14062859)
> (or a very small one, by default).

Some details here... every language other than assembly languages has some amount of runtime. This is Rust's: https://github.com/rust-lang/rust/blob/master/src/libstd/rt.... (as you allude to, many people refer to this amount of runtime as "no runtime" since it's very, very small.)

You could also consider some other things as part of a runtime; for example, by default on most platforms, Rust includes jemalloc. That can be removed, though not in stable Rust. Same with the standard library code, which can be removed for libraries, but not binaries just yet (due to a small technicality regarding the stability of some attributes.) Things that do this are likely to use some of Rust's other unstable features at the moment, so it's not generally a burden to do so, and those interfaces rarely change right now.

Re:The reference D compiler is now open source by vonmoltke on Friday April 07, 2017 @06:54PM (#14064074)
> every language other than assembly languages has some amount of runtime

How are you defining "runtime" such that this statement is correct?

Re:The reference D compiler is now open source by steveklabnik on Friday April 07, 2017 @07:13PM (#14064159)
What language are you thinking of that I'm missing? C has crt.0, for example.
Re:The reference D compiler is now open source by vonmoltke on Saturday April 08, 2017 @09:06AM (#14066715)
crt0 does things you would need to do manually in hand-coded assembly anyway. It is no different than manually creating a library of assembly subroutines that you inject into your code, at which point assembly technically has a runtime as well.

I see a distinction between a runtime library and a language runtime. The former is just a set of convenient routines for interacting with a specific platform. The latter is something that runs alongside your program to facilitate its execution, like a JIT or an interpreter.

Re:The reference D compiler is now open source by steveklabnik on Sunday April 09, 2017 @10:14AM (#14072386)
> at which point assembly technically has a runtime as well.

The key is, you are doing the injecting in asm.

Anyway, your distinction is pretty solid. Most people just use "runtime" to mean either one, and then rely on the context to disambiguate.

Re:The reference D compiler is now open source by klickverbot on Friday April 07, 2017 @09:18PM (#14064694)
Do you depend on the C runtime as well?
Re:The reference D compiler is now open source by steveklabnik on Saturday April 08, 2017 @01:10AM (#14065425)
IIRC no; basically the same thing is done though, just not as a dependency.