Live data from Hacker News

D Programming Language

dlang.org

111–120 of 278 posts

Re: D Programming Language

#111
post #51

I often see people lament the lack of popularity for D in comparison to Rust. I've always been curios about D as I like a lot of what Rust does, but never found the time to deep dive and would appreciate someone whetting my appetite. Are there technical reasons that Rust took off and D didn't? What are some advantages of D over Rust (and vice versa)?

> Are there technical reasons that Rust took off and D didn't? Yes. D tried to jump on the "systems programming with garbage collection" dead horse, with predictable results. (People who want that sort of stupidity already have Go and Java, they don't need D.)

> (People who want that sort of stupidity already have Go and Java, they don't need D.)

Go wasn't around when D was created, and Java was an unbelievable memory hog, with execution speeds that could only be described as "glacial".

As an example, using my 2001 desktop, the `ls` program at the time was a few kb, needed about the same in runtime RAM and started up and completed execution in under 100ms.

The almost equivalent Java program I wrote in 2001 to list files (with `ls` options) took over 5s just to start up and chewed through about 16MB of RAM (around 1/4 of my system's RAM).

Java was a non-starter at the time D came out - the difference in execution speed between C++ systems programs and Java systems programs felt, to me (i.e. my perception), larger than the current difference in performance between C++/C/Rust programs and Bash shell scripts.

Re: D Programming Language

#112

Earlier quoted context omitted.

Python was common place long before ML. Ever since 1991, it would jump in popularity every now and then, collect enough mindshare, then dives again once people find better tools for the job. It long took the place of perl as the quick "linux script that's too complex for bash" especially when python2 was shipping with almost all distros. For example, python got a similar boost in popularity in the late 2000s and earl…

> I always dread dealing with python developers though tbh. Out of curiosity, why is that?

There are plenty of brilliant people who use python. However, in every one of these boom cycles with python I dealt with A LOT of developers with horrific software engineering practices, little understanding of how their applications and dependencies work, and just plane bizarre ideas of how services work. Like the one who comes with 1 8k line run.py with like 3 functions asking to “deploy it as a service”, expecting it to literally launch `python3 run.py` for every request. It takes 5 minutes to run. It assumes there is only 1 execution at a time per VM because it always writes to /tmp/data.tmp. Then poses a lot of “You guys don’t know what you’re doing” questions like “yeah, it takes a minute, but can’t you just return a progress bar?” In a REST api? Or “yeah, just run one per machine. Shouldn’t you provide isolation?”. Then there is the guy who zips up their venv from a Mac or Windows machine and expects it to just run on a Linux server. Or the guy who has no idea what system libs their application needs and is so confused we’re not running a full Ubuntu desktop in a server environment. Or the guy who gives you a 12GB docker image because ‘well, I’m using anaconda”

Containers have certainly helped a lot with python deployments these days, even if the Python community was late to adopt it for some reason. throughout the 2010s where containers would have provided a much better story especially for python where most libraries are just C wrappers and you must pip install on the same target environments, python developers I dealt with were all very dismissive of it and just wanted to upload a zip or tarball because “python is cross platform. It shouldn’t matter” then we had to invent all sorts of workarounds to make sure we have hundreds of random system libs installed because who knows what they are using and what pip will need to build their things. prebuilt wheels were a lot less common back then too causing pip installs to be very resource intensive, slow and flaky because som system lib is missing or was updated. Still python application docker images always range in the 10s of GBs

Re: D Programming Language

#113

Earlier quoted context omitted.

You're harsh but that's OK. There is a lot of truth in what you're saying. I really wish people would quit downvoting everything they disagree with. HN would be 100x better if both the downvote and flag buttons were removed. To me, a C guy, the focus on garbage collection is a turn-off. I'm aware that D can work without it, but it's unclear how much of the standard library etc works fine with no garbage collection. T…

I'm not sure how I'm being harsh. It's literally a somewhat well known programming language being reposted for the 100th time or something silly like that. I'm literally just pointing out the truth and it's almost certainly the main poster downvoting things.

> I'm literally just pointing out the truth

Problem identified.

That's not popular here.

Re: D Programming Language

#115
post #76

As far as adoption is concerned, I'm not sure it should be that big of a concern. After all, D is supported by GCC and Clang and continually being maintained, and if updates stopped coming at some point in the future, anyone who knew a bit of C / Java / insert language here could easily port it to their language of choice. Meanwhile, its syntax is more expressive than many other compiled languages, the library is fea…

It has an LLVM backend, LDC, that is separate from the LLVM project/Clang.

Re: D Programming Language

#116

What can D do other languages can't? Say your starting a new Staff Engineer or Tech Lead job. What gets you to convince a CTO that we need to have a team learn D ? On the flip side, where are the 200k base salary D positions. Get me an interview in 2 months and I'll drop 10 hours a week into learning

Well, I would say it's more like glasses - you can't convince those who don't wear them, and you don't need to convince those who need them either.

What problem is D solving ?

Re: D Programming Language

#117
post #50
post #29

Earlier quoted context omitted.

It was popular as a teaching language when it started out, along side BASIC or Pascal. When the Web took off, it was one of a few that took off for scripting simple backends, along side PHP, JS and Ruby. But the real explosion happened with ML.

I agree with the person you're replying to. Python was definitely already a thing before ML. The way I remember it is it started taking off as a nice scripting language that was more user friendly than Perl, the king of scripting languages at the time. The popularity gain accelerated with the proliferation of web frameworks, with Django tailgating immensely popular at the time Ruby on Rails and Flask capturing the mi…

Sure, but the point was that it being used for web backends was years after it was invented, an area in which it never ruled the roost. ML is where it has gained massive traction outside SW dev.

Re: D Programming Language

#118
post #104

I remember the creator of D programming Language replying to me on HN on one of my posts! https://news.ycombinator.com/item?id=46261452

Walter's a regular on HN. > This very post is probably his too, under an alt :) The probability of that is virtually zero. Walter is a principled person, has better things to do, and his writing style is vastly different from the OP's.

This very post is probably his too, under an alt :)

Re: D Programming Language

#119
post #34
post #4

Earlier quoted context omitted.

For those curious what ownership and borrowing looks like in D: https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in...

This is a somewhat simplistic view of ownership and borrowing for modern programming languages. Pointers are not the only 'pointer's to resources. You can have handles specific to your codebase or system, you can have indices to objects in some flat array that the rest of your codebase uses, even temporary file names. An object oriented (or 'multi paradigm') language has to account for these and not just literal poin…

How does Rust (or C++) treat array indices as resources? And won't that defy the reason to use indices over pointers?

Re: D Programming Language

#120

Seen D being posted regularly on here, seems like flogging a dead horse. It's the equivalent of keeping grandma on life support when there is no hope.

You'd be surprised to see how active the D community is, despite your fair point that it's noticeably smaller than in the "competing" (in quotes because it's not a competition, actually) languages.

The latest release [1] was on Jan 7th, and it contains more updates than, say, the latest release of Dart, which has one of the largest corporations behind it.

1. https://dlang.org/changelog/2.112.0.html

Post reply on HN