Live data from Hacker News

Driving with D

dlang.org

41–50 of 186 posts

Re: Driving with D

#41
post #18

Earlier quoted context omitted.

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

There are "bad" uses of UFCS, and good ones (sometimes depending on preference). For example, I hate code like `1.writeln`. The major feature that it provides is pipelining (as shown in the article)

Adding a method to a class you don't control is also useful.

Re: Driving with D

#42
post #32
post #17

Earlier quoted context omitted.

I used D for a while. It improves several things over C++, among them: - More powerful metaprogramming capabilities. - Better module and library system. - Nicer syntax. The problem IMO is it's just not enough to justify a total move from C++ -> D. The syntax of C++ can't really be fixed, but the other aspects can be improved without a new language. Furthermore, many of the other downsides of C++ are still present: -…

Except that Rust compilers seem incredibly hard to implement, as opposed to C.

I don't think minimal compiler complexity is a real requirement as much as safe and reliable software is.

CPU fabs aren't easy, yet we're fine with that.

Re: Driving with D

#43
post #2

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

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.

Re: Driving with D

#44
post #40
post #19

Earlier quoted context omitted.

The idea that Rust is suitable to replace C and D isn't is odd to me. It's really not hard to do + we (unlike some languages, not sure about rust) actually test on embedded targets via GCC.

What I meant by this is: if you are starting a project today, and have to choose between C and C++, there are certain reasons why you might choose C over C++. Those same reasons would apply for choosing C over D. They might not apply for choosing C over Rust.

I can't think of a reason that would apply here. For me at least if I were on a toolchain so crap I had to use C you'd have to pay me a lot of money not to work on something else.

Re: Driving with D

#45
post #18
post #15

UFCS example uses units, which looks neat, but assigns injectorWidth to a variable injectorTime, which seems wrong?

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

Can you expound upon why you feel that way?

Re: Driving with D

#46
post #17
post #2

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

I used D for a while. It improves several things over C++, among them: - More powerful metaprogramming capabilities. - Better module and library system. - Nicer syntax. The problem IMO is it's just not enough to justify a total move from C++ -> D. The syntax of C++ can't really be fixed, but the other aspects can be improved without a new language. Furthermore, many of the other downsides of C++ are still present: -…

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

Re: Driving with D

#47
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.

Out of curiosity, what is your job?

Re: Driving with D

#48
post #18
post #15

UFCS example uses units, which looks neat, but assigns injectorWidth to a variable injectorTime, which seems wrong?

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

do you have open vacancies? :-)

Re: Driving with D

#49
post #2

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

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.

Re: Driving with D

#50
post #18

Earlier quoted context omitted.

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

Can you expound upon why you feel that way?

UFCS as a concept is fantastic but the one hangup is that D's language server implementation by the community and its IDE integration can't handle it because of the complexity.

https://github.com/Pure-D/serve-d

https://github.com/Pure-D/code-d

(I can't remember if the Visual Studio extension, VisualD handles UFCS or not)

http://rainers.github.io/visuald/visuald/StartPage.html

It's possible to implement, because Nim's language server handles UFCS, but atm D's doesn't do it (it's written pretty much by one people)

So personally I avoid UFCS except for very simple/common function like "to!" because it breaks the intellisense for that call.

Though if I knew the language inside and out probably I wouldn't care.

It's still my "favorite" language.

-----

SIDE NOTE: This single person wrote the D lang server, and has maintained it, written and maintained the VS Code extension, and other fundamental tooling + libs for years.

https://github.com/sponsors/WebFreak001

If you use D and feel like sponsoring someone, consider sponsoring them, or Rainers (VisualD), or the maintainers or LDC or GDC, also single individuals for the most part.

LDC Maintainer: https://github.com/sponsors/kinke

GDC Maintainer: https://github.com/sponsors/ibuclaw

Post reply on HN