Live data from Hacker News

Driving with D

dlang.org

81–90 of 186 posts

Re: Driving with D

#81
post #76
post #74

Earlier quoted context omitted.

Would it be fair to say that for some time (I wouldn't know exactly when it started) D has evolved to serve the needs of the D community rather than to attract new people?

Attracting new people is basically never (with exception of the C stuff) been the driving force behind efforts influencing D's design. Another anecdote - Someone who hires people in D has told me definitely that D being small means that hiring for them is usually just seeing some code, i.e. there hasn't been an eternal September let's say. They can onboard people who don't know the language, but knowing D is a very g…

Thanks, that's interesting.

Re: Driving with D

#82

Earlier quoted context omitted.

Honestly, I believe it is much more about marketing than one might expect.

That's kind of an uncharitable way to say, "Rust has a welcoming and beginner-friendly community". It's not like there's a marketing team buying Facebook ads.

I don't know if I'd say beginner (an initio) friendly but we have some really clever people on our forums who have a lot of time for new people.

There will be a book on dlang.org soon, that's the one thing I think we're lacking at the moment.

Re: Driving with D

#83
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

I think there are just two big factors - garbage collection and tools. When it was made garbage collection seemed reasonable, but with modern C++ and rust we now know that tracking ownership through different scopes solves the same problems very well with none of the downsides of garbage collection. If you look at D, Julia, C#, Java, Ocaml, etc. etc. over and over you see people eventually fighting with the garbage collection over throughput and latency.

D to my knowledge has never fully transitioned to garbage collection being a thing of the past.

For tools I think D fell into a common trap, which is to just keep working on the language itself. Eventually the lack of debugger, real time syntax checking and auto completion take their toll and something like C++ seems better even with the rough edges of the language itself.

Re: Driving with D

#84
post #43

Earlier quoted context omitted.

Challenging to overcome languages like C++, Rust, Java, and C#. D seems to sit somewhere in between, a better C++, but with (optional) GC. The thing is, Java and C# are already making strides into that space.

Back when D originally debuted, I couldn't separate it in my mind from C# and Java, despite the fact that you could manage your own memory. It felt like it fit into the same space, yet didn't have a compelling ecosystem. (Competing standard libraries did not help their case!) That's at least why I glossed over it.

Java and C# also offered similar capabilities when D appeared.

Granted on Java side it required sun.misc.Unsafe, JNI or Real-Time JSR, while on C# side, a mix of structs, SafeHandle, MarshalInterop, unsafe and eventually C++/CLI.

So while not as pleasant as D, the cost to drop those eco-systems wasn't worth the cost to switch, and now 10 years later those eco-systems have doubled down on improving the experience for low level coding.

This makes it quite hard to sell D to those potential users.

Re: Driving with D

#85
post #46

Earlier quoted context omitted.

I am learning Rust and SPARK2014, and I would think SPARK2014/Ada would be a better fit for high-integrity software for verifiable, embedded software than Rust. This was the older article that stimulated me to look at Ada and then SPARK2014 again: https://www.embedded.com/spark-2014-why-i-am-backing-a-predi... EDIT: Cool list of SPARK2014/Ada embedded projects: https://blog.adacore.com/tag/embedded%20development

That's probably true for now. But only because there's no equivalent to SPARK for Rust yet. Rust + something like SPARK could be really amazing.

There are some things that attempt to come close. Prusti by ETH Zurich is maybe the closest.

https://github.com/viperproject/prusti-dev

https://www.pm.inf.ethz.ch/research/prusti.html

    extern crate prusti_contracts;
    use prusti_contracts::*;

    #[requires(something)]
    #[ensures(result >= a && result >= b)]
    #[ensures(result == a || result == b)]
    fn max(a: i32, b: i32) -> i32 {
        if a > b {
            a
        } else {
            b
        }
    }
Ada seems like a fantastic language though, and the 202x edition brought some niceties to the language.

Re: Driving with D

#86
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

A lot of people have mentioned a lot of reasons, marketing, corporate support, etc...

I think a language technology needs at least one, but ideally a few, flag ship projects using it. It provides some examples for people to see, it shows the "why" and then it also connotes that it's living and good. I don't think it has to be big, just good. Ripgrep is a prime example, there are a few other smaller tools in Rust that are nice, well put together tools that do a nicer or better job than the old standards.

You can talk about why something is nice or better, but actually showing people that it is probably convinces more.

Re: Driving with D

#87
post #46

Earlier quoted context omitted.

I am learning Rust and SPARK2014, and I would think SPARK2014/Ada would be a better fit for high-integrity software for verifiable, embedded software than Rust. This was the older article that stimulated me to look at Ada and then SPARK2014 again: https://www.embedded.com/spark-2014-why-i-am-backing-a-predi... EDIT: Cool list of SPARK2014/Ada embedded projects: https://blog.adacore.com/tag/embedded%20development

That's probably true for now. But only because there's no equivalent to SPARK for Rust yet. Rust + something like SPARK could be really amazing.

Rust's type system still lacks the expressivity of Ada. Rust has a lot to teach Ada (and you see this coming out from AdaCore's blog recently with efforts to add lifetime analysis to SPARK), but Rust has a ton to learn from Ada as well.

Re: Driving with D

#88
post #36
post #13

Hi, I'm the author of the article. Feel free to ask any questions you may have. I have to go to bed, I have work in about 4 hours, so I'll reply when I can.

What are the legal hurdles you had to jump to get this hack approved for street use? As car modders know all too well, this can often be the hardest task.

I follow the car modding scene and to be honest, in the U.S. there don't seem to be anything preventing this from being street legal. Even in California, something like this being a non-engine mod I don't see it being an issue.

Re: Driving with D

#89
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

Not different enough to be worth switching from Java/C++ with their much bigger and more established communities. This was especially true earlier in it's history when it required GC. Now it doesn't, but it has to compete with Rust which can also offer memory safety.

Funkwerk, one of the first companies to adopt D back in 2008, switched their passenger information system from Java and C++ to D. They weren't just on the look out for something different. They had a real problem to solve, tried out a few languages, and settled on D. They're still using it today (they moved from D1 to D2). And if you're riding certain rail networks in Europe, you're benefiting from it.

https://dlang.org/blog/2017/07/28/project-highlight-funkwerk...

Re: Driving with D

#90
post #61
post #58

> From the factory, it came with a rubbish four-speed automatic gearbox. During 18 months of ownership, I destroyed four gearboxes. [I'm from Europe.] I absolutely don't get this. Just... what? Four gearboxes? I don't know anyone who destroyed a single one - even after an entire lifetime of daily driving, but I don't mean Mercedeses - more like Škodas. What's up with American cars? Is this common? Edit: my bad, the c…

Holdens are Australian, not American.

They're owned by GM now. Modern ones will be GM parts-bin cars. Going through that many GM transmissions is possible. This is why GM cars have horrible resale value and anything over 150k miles is on borrowed time.
Post reply on HN