Now that we've covered all of the language and standard library features we're going to cover, it's time to add the finishing touches to MovieMan. There are two modules that need to be modified:
$MOVIEMAN/source/movieman/db.d. We'll start with fleshing out
DBTable. At the top of its declaration, add the highlighted line as follows:
T _items; bool _sortRequired;
In order for the movies to display in a sensible order, they'll need to be sorted. We could perform the sort every time a movie is added or every time the movies are displayed. The problem with this is that sorting is going to become an expensive operation as more and more movies are added. There are different ...