Andrei:

> http://uvu.freshsources.com/page9/page7/files/Syllabus4450.html

This is good. Despite its bugs/unfinished parts D2 is a good language to teach 
certain kinds of lower level programming (and some OOP too).

This is the page of the resources of the course:
http://uvu.freshsources.com/page9/page7/page7.html

This is the D Homework:
http://uvu.freshsources.com/page9/page7/files/D%20Homework.docx

It contains:

Implement a deque in D using two dynamic arrays, as depicted above. The 
following functions should be present:
push_front(x)
push_back(x)
pop_front() 
pop_back()
at(uint pos) 
back()
front()
size() 

I see two small problems there:
- uint used instead of size_t
- Names like_this instead of the D idiom likeThis.

He also gives a quite useful unittest that the student implementation must 
pass, this is a good usage of unittests. The unit test ends like this:

...
    writeln("unit test passed");
}

Indeed, a person needs feedback that the unittests have run (and have succeed), 
I have used similar things in my dlbs1 (but more refined). This kind of need 
for feedback is so natural that something like that will be better somehow done 
on default by D.

Bye,
bearophile

Reply via email to