Why dlang: Thoughts when choosing D as a programming language
Not logged in

Why dlang: Thoughts when choosing D as a programming language

An intro of sorts

A critique of myself is that I lack focus. The extends to every part of my life: Home, work, personal physical world projects, personal digital projects, learning (I switched my major in college 3 times, almost 4), and, per the topic of this page, learning programming languages. I have made the observation probably dozens of times at this point that I would probably excel if I just stuck to one language that allows me the freedom to do what I want and not get in my way. Like really learn it.

I'd say the closest language that I've done this with is probably tied with C# and Perl. If I want something done in either of those languages, I get it done. Problem with C# is that it is quite Windows-centric (and the solutions to program it not using an IDE like Visual Studio or VS Code kinda suck (yes, I count VS Code as an IDE, not a text editor) (much in the same way Emacs is an operating system, though I think Emacs actually achieves that in a great way)).

I counted recently, and I have programmed in 36 different languages beyond basic hello world programs. The experience level ranges from going through full tutorials (in which I've done Learn You A Haskell For Great Good probably 3 or 4 times) to implementing a nontrivial library (like in Smalltalk, specifically Cuis, in which I implemented an octonion number library for myself), to dipping my toe into doing a few control structures.

Basically, despite the fact I've learned 36 languages, I would not say I could really do full blown projects with them.

A lot of this article is qualitative analysis according to my own personal tastes. I think that's important to realize, as the programming world is full of dogmatic thinking (e.g. spaces vs. tabs, vi vs. emacs, IDE vs. text editor, "goto considered harmful", "Go To Statement Considered Harmful", and "'Go To Statement Considered Harmful' considered harmful"). If anyone has any data on that front, hell yeah, I'm open. Contact me or edit the article (if you got a login via the ticket system first).

I'm going to go through the languages I consider significant enough in my own experience to warrant different sections, and thoughts on each.

QBASIC

QBASIC was my first programming language in high school. It was reasonably self-contained, had sprite mapping support, and its IDE was console-based, yet still pretty featureful.

I love it, and if there was a language ecosystem like it that was pretty full featured and workable today, I'd probably use that. However, its "toy" status in the modern day unfortunately really taught me that for a first language, from a pedagogical perspective, you usually want to point someone toward a language that's both learnable and also useful when they graduate into the next era of experience.

And that kinda sucks. It's a nice little language. Yeah, it had gotos, but unlike most of the world who want to think they can't disagree with the experts of yesteryear in an era of goto statements that are fundamentally different with the goto statements of today (for example, you can't enter a function in multiple places most of the time anymore), I don't really mind goto statements. I think visceral reactions against gotos are the mark of a programmer I simply don't want to work with, because they will drop everything just to make sure a single goto doesn't enter the codebase (while either ignoring the high cyclomatic complexity of the replacement code, or ignoring how the rest of the code is a mess and a half.

QBASIC has a special place for me. I think that's most people's first programming languages.

C++

This was my second programming language in high school. What a large jump, yeah?

I've also tried to tackle C++ on and off. Every time, I'm mostly put off by having to search "best initialization syntax" and the correct answer to that being "always use {}-initializer syntax".

That, and it requires a build system. I don't mind requiring a build system, but it is a point of friction that works against it.

I don't have much to say about C++ except that I think there's a good, proper subset of C++ syntax with a certain C++ version you can use to avoid a lot of its problems. Finding and achieving consensus on that subset and version is a whole 'nother matter.

Ada

I learned Ada in college as part of a software engineering course. We never compiled in it. The computer science curriculum was kinda shite, though, and both me and my buddy got some points marked off on an assignment for putting in correctly-compiling Ada code from the instructor's example.

I've approached in on and off, and I agree with a lot of why it was created. However, landing a job in it isn't quite easy for someone without a college degree (plus many of those are Department of Defense Department of War projects, and I have ideological issues with bombing brown people for imperial reasons). So it goes.

I love Ada, and in a world where people didn't keep the criticism of it being a "large" language around (Python's standard library today is larger than its standard library). Plus programmers seem to be really fucking allergic to case insensitivity in the programming language itself for some reason.

Later I will probably dive into why I dislike design-by-committee and corporate-pushed language projects, and I find that hard to reconcile with Ada being very obviously designed by the Department of Defense (as it was called at the time; yeah, I'll deadname a government project, fuck it), but it was to answer very real identified problems that they wanted their fresh new language to solve (and I don't believe it could have been done more easily any other way).

C

I learned C on my own. I think the first successful tutorial was The GNU C Programming Tutorial.

I am both ideologically aligned with C (the common C ABI on a platform is often the de facto standard ABI to link libraries), but also mentally opposed to it. I can't say I am incapable, but it's very, very difficult to not get stuck in the weeds (I have a focus issue, as aforementioned, and shall be mentioned subsequently, probably).

The best way I powered through learning it was pretty much just waking up, immediately going through the tutorial. If I became tired or unfocused, I immediately went back to bed. Repeat that a few times, and I got the recipe for never having my attention waver.

Unfortunately, it's quite unrealistic to do so with my current life situation. Mostly having a 9 to 5 will wreck that. Would love like a month off at some point so I can do that, but... Eh 🤷.

More to come...?

More to come if I remember to come back. My system is finished updating like 400 packages because I only run this laptop once a month. Yay Debian stable!

Notes for future me: I think my main dislike of a programming language usually comes from how corporate it feels. That's why I bounce off of Rust and C# for hobby programming, C holds a special place (because of GNU), and C++ is design-by-committee that I really, really dislike. D, on the other lacks a corporate sponsor for explosive growth, so it might be why I gravitate toward it often enough.

(Go back to home)