C++ interop sounds like a great unique selling point. Rust/Go/Swift can't match it.
It's not unique. Nim offers C++ interoperability too. https://nim-lang.org/features.html
My Vision of D’s Future
111–120 of 211 posts
Re: My Vision of D’s Future
#112Earlier quoted context omitted.
I find that D is about as easy as Python to get into. Being able to use rdmd as a shebang makes D almost feel like as scripting language. A lot of Python was also pretty easy for me to directly translate into D. Here is an example: http://inversethought.com/hg/medcouple/file/tip/medcouple.py... http://inversethought.com/hg/medcouple/file/tip/medcouple.d#...
While I enjoy using D, I find it hard to use at times. Especially if someone isn't a C++ veteran, as soon as heavy template usage comes into play I get confused, and error messages are useless because it's several screens of errors with multiple isX() && !isY() && isZ() conditions for types. Most of the standard library function calls return some opaque Result type which isn't obvious how to progress from. Only after…
Re: My Vision of D’s Future
#113Earlier quoted context omitted.
While I enjoy using D, I find it hard to use at times. Especially if someone isn't a C++ veteran, as soon as heavy template usage comes into play I get confused, and error messages are useless because it's several screens of errors with multiple isX() && !isY() && isZ() conditions for types. Most of the standard library function calls return some opaque Result type which isn't obvious how to progress from. Only after…
Having to use .array() on the Result of some functions is the exact same problem I've ran into as well! D is by far my favorite language but there is definitely some room for improvement in terms of documentation on how to use the standard library.
The python version of it would be calling `list()` on things all the time, which you might not always want to do.
Re: My Vision of D’s Future
#114Re: My Vision of D’s Future
#115Earlier quoted context omitted.
I work in c++ and D was designed in part to address a lot of c++ complaints. so I find myself with very few issues while writing D. it's just a very enjoyable experience (subjective ik) the meta programming is very cool also
I am worried the push towards integration with C++ will just turn D into a cheap C++ clone. We already got copy constructors, just to interact with C++ code. More C++ features to come.
Re: My Vision of D’s Future
#116Earlier quoted context omitted.
I guess I also mean actually referring to it more as DLang (or something) so people start calling it that. "D" is so hopeless to even use in conversation. Even "Rust" is miles better, and that's not exactly a brilliant name either.
> "D" is so hopeless to even use in conversation. Not any more hopeless than one of the top-10 most popular languages, C. Except if you mean the juvenile joke it alludes to, in which case, nobody really cares between adults. No company is not gonna be use D because in some memes it means dick. Libraries, tooling, maturity, devs, speed, are the real concerns...
Re: My Vision of D’s Future
#117Earlier quoted context omitted.
Most languages settle down with C interop and don't bother with the added complexity from C++. Rust is one of those, some of the concepts aren't even on the language right now, what would lead to very non-idiomatic imports.
The Rust bindgen tool automatically generates Rust FFI bindings to C and C++ libraries. Mozilla uses bindgen a lot to interoperate between Firefox's C++ and Rust code. IIUC, Rust and C++ code can't seamlessly call each other unchanged, but bindgen adds FFI glue that makes it much easier. https://github.com/rust-lang/rust-bindgen
A C interface on C++ code is how most people do interoperability with C++ libraries. It is pretty much C, so you can just use the FFI. But it's not really a C++ compatible FFI.
Re: My Vision of D’s Future
#118Re: My Vision of D’s Future
#119Re: My Vision of D’s Future
#120I have to say, I like what I read there. I'm glad they're working more on c++ interoperability. I've ported some c++ code to D before, it wasn't not too bad, it wasn't a lot of code, but it would be great to be able to work directly with c++ libraries in D similarly to C libraries. It always makes me sad D hasn't picked up more. Usually comments I see about D seem pretty ambivalent to dismissive. It's a great languag…
The main reason that D hasn't been picked up by anyone is mostly because it is an evolution of C++, not a revolution. Discarding an entire ecosystem for an evolution is not going to happen. Rust took a very different approach and just threw everything away. D looks and feels too much like C++, I would rather have hoped that effort would have been spent on making C++ better.
Walter Bright did try to make C++ better, remember that D came along after he wrote the Digital Mars C++ compiler.
C++ has also improved in the meantime.