D as a college language

Marco de Wild admin at localhost.com
Sun May 6 09:16:24 UTC 2018


On Sunday, 6 May 2018 at 00:35:19 UTC, Sameer Pradhan wrote:
> I thought it might help if I mentioned that I successfully used 
> D as one of three languages to teach the Programming Languages 
> course at Vassar College last Fall.
> --
> Sameer

I can actually kind of relate to this.
For some background, I work at a company that offers traineeships 
in software engineering to technical graduates. The traineeship 
is basically a crash course in high level application 
development. Our main language to teach is Java, because our 
biggest customer uses it. We try to focus on design concepts 
rather than programming languages.

The subject I teach is object oriented programming and 
test-driven development. For the slides and the demo, I use D. I 
have two main reasons for this.
Firstly, I don't want the students to become hardcoded Java 
programmers, who panic when they need to switch languages. I want 
them to gain the confidence that the gap between various 
programming languages (mainly in the C family, or one family in 
general) is very small and, more importantly, that they can 
transfer the knowledge they already have.
Secondly, I want them to focus on the concepts. During a demo, if 
I ask them how to set up a test in Java, they think and answer in 
code. If I ask them to set up a test in D, they think in 
concepts. I then do the translation to code.
(For the record, they implement the assignment in Java.)

Last course, we had a normal group of Java programmers and a 
trainee who was learning Python. The trainee was the one who 
understood the OO principles the fastest, because she was forced 
to think in concepts and not implementation.

For my personal studies, I programmed in Ocaml for a while. Even 
though you can mimic the concepts in D using pure and const, it 
still broadened my horizon.

If I have to conclude anything, it is that there, in my opinion 
and in the context of my philosophy, should not be a one language 
during a study. D definitely has a place in there with how 
different language features are set up. I think Ali's book is a 
great start, as it explains the concepts as well as the 
implementation. The D lang tour for example focuses on learning D 
when you know how to program, which is a completely valid use 
case as well.

It would be cool to have a "Learn programming with D as a tool" 
section on the website, but I doubt it would be worth the effort. 
People who study in their free time go to well-known sites like 
Code Academy and people who have their own course (like me), 
write their own material based on their course setup and learning 
goals.


More information about the Digitalmars-d mailing list