Live data from Hacker News

How does D improve on C++17?

p0nce.github.io

1–10 of 77 posts

Re: How does D improve on C++17?

#2
D looks like a really interesting language, I had never checked it out prior to reading this. unittest blocks look like they'd be super helpful. And it has modules, which I consider a must-have.

In what areas would D excel? What are its downsides? What did you like and dislike the most? I'd be really interested in hearing about people's experiences.

Re: How does D improve on C++17?

#4

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

WalterBright uses it in his compiler.

Re: How does D improve on C++17?

#5

D looks like a really interesting language, I had never checked it out prior to reading this. unittest blocks look like they'd be super helpful. And it has modules, which I consider a must-have. In what areas would D excel? What are its downsides? What did you like and dislike the most? I'd be really interested in hearing about people's experiences.

As a D programmer currently making a small game engine + networked rts game in the language, invariant blocks are another thing I really enjoy about the language: http://dlang.org/contracts.html#Invariants

Lets you specify contracts which are asserted on construction and destruction, it's great.

The meta programming is also wonderful for things like serialization of data, simply iterating over a type's members at compile-time to generate serialization code, cutting out much bloated code. It's worth noting that it's metaprogramming for humans, _compared_ to c++, but sometimes leaves a bit to be desired documentation-wise, all the building blocks are there, but sometimes you'd like to not need to reinvent the wheel every time you attempt some metaprogramming-related task.

Things I don't enjoy include the core language's reliance on the GC, including things like exceptions relying on GC allocations.

Thankfully they've made it a bit easier to track down things which may allocate gc memory lately with accompanying flags to the compiler, which prints a trace of where it may happen.

Re: How does D improve on C++17?

#6

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

We (AdRoll) use it for performance-sensitive machine learning:

http://tech.adroll.com/blog/data/2014/11/17/d-is-for-data-sc...

Re: How does D improve on C++17?

#7

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

This is an interesting one: https://github.com/prestodb/presto-odbc But I am not sure whether D is a perfect fit here though.

Re: How does D improve on C++17?

#9

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

WalterBright uses it in his compiler.

He's a little more involved in D than using it in his compiler :)

Re: How does D improve on C++17?

#10

I'm curious how many people out there on HN actully use D and what for? I don't typically see D based projects here on HN so it would be interesting to find out about any use cases where D was found a perfect fit.

Facebook uses Warp[1] as a fast replacement for the c/c++ preprocessor.

[1]https://github.com/facebook/warp

Post reply on HN