NewsBot

NewsBot

How I Taught the D Programming Language at a Russian University

A new D blog post/announcement has been posted!

Get the full details here: How I Taught the D Programming Language at a Russian University | The D Blog

Most Liked

OvermindDL1

OvermindDL1

I do think D could have had a chance of upsetting or perhaps even replacing a lot of C++ usage except it had a couple major downsides in the past that stopped it (less so nowadays):

  • Optional Garbage Collector, and being optional means that it’s not optional, as if it’s used anywhere then you are infected and the whole program scanning starts.
  • Two major standard libraries, one leaned more heavily on the GC than the other (which was mostly or all GC free?). Nowdays one has already won out but it’s waaaay late for that.

The first is a MAJOR issue for C++ devs, the second was a complete failure as a usability requirement.


One big thing from the article:

C++11/17/20 novelties were first battle-tested in D

Ehhh, no, not really at all, rather they were "battle-tested’ in Boost for long long before D, in some cases for long before D ever existed.


And now Rust has better safety and reliability, even if not as many features, but those are things that exceedingly appeal to C++ devs, so I can’t really see D getting popular, much as an enjoyable language that it is, it missed its chance to shine due to those two big issues above in its past.

AntonRich

AntonRich

I like a few things from the article:

  • This is the story about how … and how students sometimes surpass their teachers.

  • In my first months of university, I entertained the thought of being a school teacher. Now I realize that this was just a call for justice of sorts. There is a stark difference between a high school and a university, and for me, the latter was a much better experience. It felt like in just one month at university I learned more than in one term in high school, and that was so cool. Why couldn’t they explain it this way back in high school , was my common thought. If only educators applied the same educational methods in a regular school, it would make the experience much better. My desire to become a teacher vanished the second I received my first paycheck as a programmer (in Russia, ‘programmer’ is a very well-paid job and ‘school teacher’ is the total opposite), but some memory of that desire remained.

  • This was also the time when I became interested in D. Compared to C++ it looked like a perfect programming language. You can write code that would be as fast, but without all those C atavisms. I used D for my master’s thesis, and I loved it. My program was twice as small and simple as the older C++ version while performing better. Implementing complex and more efficient algorithms in D was much easier; doing the same in C++ would be too much work, and, like any student, I always struggled with my deadlines

  • In 2018, an unusual offer surfaced on the D mailing list: …

  • I didn’t see myself as a full-fledged lecturer and expected to be just an assistant. At the beginning that was the plan, with someone else acting as a lecturer. He was going to give lectures remotely via Skype, and I would assist him on site.

  • To my surprise, the university in question was

  • I checked their program: D was introduced for third-term students, and during the first two terms they learned C, C++, Prolog, and even some Lisp, I think (a bit too much, but why not). Their math course was solid, too (yes, I am among those who think that math is important for programmers).

  • We started working on the course program, although I barely included myself in that “we”. That was a mistake. With one month left until the classes started, the lecturer was suddenly leaving us. The news took me by surprise, but… there was still plenty of time, right?

  • Everything was saying that there would be no help and that I had to do the whole course by myself, but my impression was hard to shake. The grave realization only came one week before Day One. Only then did I start to prepare for real.

  • This is supposed to be the part about the trials and tribulations of the endless bureaucracy awaiting a poor programmer’s soul.

  • Things like the principles of import are easier to grok when using a command-line compiler rather than some “intuitive interface”.

  • Lifted by the success of the first seminar, I was slammed to the ground by the first lecture. It contained the full theoretical explanation of type systems and their various types, compared D with other languages, brought out the problems of C and C++, and demonstrated what makes D different. It was a total failure.

  • But the problem was with the lecture itself. First, it was too much for one class. Second, the lecture was based on the talks I did for my job that were intended for seasoned programmers. I realized that everything that I’d prepared for my future lectures must be tossed aside and rewritten from scratch.

  • https://youtu.be/-ruC5A9EzzE

  • I had several reasons to think that this was a well-fitting problem. First, I could write a solution I expected to see from the students in five hours or two evenings. Compensating for the students’ level, it looked like a good project for a semester-long assignment. Second, the solution isn’t too straightforward. Simple brute force would take too much time so you need to cut off the equal variants in the beginning. And third, I was fascinated by this problem myself, so I thought the students would feel the same. I couldn’t be more wrong.

  • That’s how in just one year you become an old geezer teacher who can’t keep up with the times.

  • The chemistry of a group coding session with a teacher ready to help won’t kick in.

  • Bad students will skip classes anyway, but lazy B-graders could benefit from a little scolding.

And there were moments when I raised some questions:

  • Secondly, a broader outlook makes for better code. My familiarity with D improved my C++ skills and made it much easier to learn Python, especially its iterators. Most importantly, D is the future—of C++ and beyond.

    • Is it really? I don’t know myself as I haven’t touched both D nor C++.
    • I suspect the author means that some of the concepts from D will be transferred to C++.

There is a challenge that I’d like to love myself, but with a different language. I don’t know how to point to the exact spot in the document. But follow the link and search for:
s = Multiline string, each line containing

To the surprise of the teacher each years students solve this problem differently and may find a better solution.

It’s also really interesting to see the translation. I haven’t read tho original one yet.

dimitarvp

dimitarvp

Yeah, there is a huge class of techies that sincerely believe having several options for certain big and important needs (and thus libraries) is desirable. That’s one of the things that is still putting me off in OCaml btw.

At one point core contributors and community should converge and start agreeing on what’s the go-to way even if it lacks in one way or another – there are sub-libraries springing up that deal with some perceived or real deficiencies in the bigger / std library and all is right in the world.

I don’t know why the above is such a mind-blowing revelation for so many programmers. Maybe some misguided notion of “competing libraries” or “democracy” or “choice” or whatever. But writing code for money is not a political statement; it’s a job. Way too many people lack the ability to discern between the two, somehow.

Where Next?

Popular Backend topics Top

Eiji
Elixir version 1.10.3 has been released on Apr 25, 2020. See the release announcement. This release officially supports Erlang/OTP versi...
New
First poster: bot
Spring v5.3.0 has been released. Link: Release v5.3.0 · spring-projects/spring-framework · GitHub
New
First poster: bot
Kotlin v1.4.20 has been released. Link: Release Kotlin 1.4.20 · JetBrains/kotlin · GitHub
New
First poster: bot
V weekly.2021.11 has been released. Link: Release weekly.2021.11 · vlang/v · GitHub
New
First poster: bot
A new Ruby blog post/announcement has been posted! Get the full details here: CVE-2021-28966: Path traversal in Tempfile on Windows
New
First poster: bot
A new Haskell blog post/announcement has been posted! Get the full details here: GHC 9.2.1-alpha2 now available — The Glasgow Haskell C...
New
NewsBot
Gleam v0.16.0 and v0.16.0-rc4 has been released. Link: Release v0.16.0 · gleam-lang/gleam · GitHub Link: Release v0.16.0-rc4 · gleam-...
New
First poster: bot
Node.js v16.17.0 has been released. Link: https://github.com/nodejs/node/releases/tag/v16.17.0
New
First poster: bot
A new PostgreSQL blog post/announcement has been posted! Get the full details here: PostgreSQL: New podcast Postgres FM
New
First poster: bot
Node.js v18.16.0 has been released. Link: Release 2023-04-12, Version 18.16.0 'Hydrogen' (LTS), @danielleadams · nodejs/node · GitHub
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
New