Live data from Hacker News

D Language accepted for inclusion in GCC

gcc.gnu.org

211–220 of 235 posts

Re: D Language accepted for inclusion in GCC

#211
post #208

Earlier quoted context omitted.

> C++ name mangling is not standardized and so every compiler can implement its own scheme. That's right, and the D compiler deals with that by customizing the C++ mangling for every platform.

I am just curious what the actual list is, it is surely not possible to support every version of every compiler on every platform.

We don't. We pick one.

Re: D Language accepted for inclusion in GCC

#212

Earlier quoted context omitted.

The reference compiler got open sourced about 2 months ago. https://news.ycombinator.com/item?id=14060846

How does this work exactly from a licensing perspective? Will they merge the dmd sources into the gcc tree? Does this mean that the D compiler in gcc will now be GPL(v?) licensed? This is certainly possible since dmd is licensed permissively. https://github.com/dlang/dmd/blob/master/LICENSE.txt I don't mean this to start a fight over licenses I'm just curious how it works when gcc lets other projects in.

In general, it's possible to create a combined work made from parts with different licenses, provided that the licenses are compatible. So if you have part A licensed under, say, the MIT license, and part B licensed under the GPL, then the combined work falls under the GPL (due to the GPL "virability", and since the GPL and MIT are compatible in the sense that the GPL restrictions are a superset of MIT ). You can still later on extract part A and distribute that under the MIT license.

I don't know the details of the D compiler frontend that has now become part of GCC, but I'd imagine its something like that. E.g. the GCC Go frontend is, AFAIK, BSD licensed.

Re: D Language accepted for inclusion in GCC

#213
post #146
post #36

Earlier quoted context omitted.

I like Rust, but I hate with a passion the borrow system. So I was looking for an unsafe-by-default Rust and I found D, thanks to the suggestion of a kind HN user. I must admit that I love it!

Interesting. I like rust, and struggle with the borrow system, but what i'm looking for is a garbage-collected Rust!

Garbage-collected Rust? I think Scala is very close, particularly with Scala-native.

Re: D Language accepted for inclusion in GCC

#214
post #170

Earlier quoted context omitted.

Go is more a better Python. Even simpler syntax. Types and compiles to native (as they are all the fashion now). Rust is the best bet we have at a better C (and a better low-level C++). High level C++ competes with D and Go. Rust is a little too specifically targetted at the low level "systems" programming.

I don't think a "better Python" can be statically typed - dynamic typing, and all the associated runtime tricks that you can do with it, is kinda part of what makes Python distinctive (whether for good or bad, opinions differ there).

Go has this "interface" thing which lets you do duck-typing, and it's checked at run-time, as the types in Python.

Re: D Language accepted for inclusion in GCC

#215
post #210

Earlier quoted context omitted.

No as Go has a GC. It's just supposed to be a fast server-side language without very complicated code. Go is mostly successful due to Google and filling a niche (fast, simple, concurrent, all thrown into a fat statically linked binary I think).

> No as Go has a GC. So what, so do Oberon, Modula-3 and many others including D. Yet quite a few production OSes were even written with them, e.g. Native Oberon for the Ceres Workstation at ETHZ.

I think I'd rather not have GC in my OS. Oberon was a pretty small language, so perhaps the pauses were more acceptable.

Re: D Language accepted for inclusion in GCC

#216
post #90

Earlier quoted context omitted.

Slowly but steadily. Given the fact that D has not managed to die when it had so many chances to, I tell that D has better chance at mass adoption as "a better C++" than the current wave of Swift/Rust/Go that rely on "life support" from a corporate donor.

If I'm not mistaken, Rust is being sold as a better C, not C++. Go is being marketed as a higher level language than C and Rust focused on developing network-aware concurrent applications to fill specific server needs. I may be wrong, but I'm not really sure that they target C++ or aim to replace it, unlike D. Perhaps that's the reason why both Rust and Go managed to gain so much traction and goodwill, because they a…

D may be a sort of "SpaceX" of languages, designed to improve the competition up to a point it's no longer needed, more or less like Scala did with Java. But even that is a huge success, maybe better than finishing C++ off.

Re: D Language accepted for inclusion in GCC

#217
post #210

Earlier quoted context omitted.

> No as Go has a GC. So what, so do Oberon, Modula-3 and many others including D. Yet quite a few production OSes were even written with them, e.g. Native Oberon for the Ceres Workstation at ETHZ.

I think I'd rather not have GC in my OS. Oberon was a pretty small language, so perhaps the pauses were more acceptable.

It even supported live video editing.

Pauses weren't an issue for users' productivity.

Re: D Language accepted for inclusion in GCC

#218
post #80

Earlier quoted context omitted.

D seems like a more useful Rust, or is that completely wrong?

Just more pragmatic, I'd say. D isn't a "big agenda language" (to steal a line from Jonathan Blow). It's extremely multi-paradigm (some might argue to a fault). I think that's why you find people saying D is like C++ or D is like C# or D is like Go or D is like Rust. You get a little taste of everything using D. Want function programming and purity? Check. Want C style/low abstraction code? Check. Want extreme C++ me…

Want unit testing? Check.

And built in at the compiler level, so it happens when you compile your program as you normally would, the tests show up while compiling, and the output does not contain the code. Always impressed me.

Re: D Language accepted for inclusion in GCC

#219

I remember trying out D a few years ago. One of the things that threw me off was the bare-bones compiler. I think I was using the reference compiler at the time. The language itself I thought was pretty cool, slices are neat. I could really see D take off now that it's getting gcc support.

These days you'll probably want to be using dub, no matter which compiler you're using. Makes managing dependencies a lot easier, and compiling a simple `dub build` for projects of any complexity..
Post reply on HN