IMHO, an introduction into collection should start with little overhead. (and it should be mode objfpc )
Unless I misread: that is already covered in the non-generic part of the wiki entry, which I left intact, but otherwise I will add my little example above.
I only changed the generics part because that was nonsensical and that little example above is proof of that..
About mode: I strongly disagree. Like many I need my code to compile in Delphi too. And the generics syntax for mode objfpc is to some extend legacy because it came from before Delphi supported generics in a - much - cleaner way. (I am aware of some more flexibilities, though) But I can rework or add an example in mode objfpc if you insist. I am not going to change the unit, though, only bug fixes or enhancements.
I can add something like this:
program simpledemo;
{$ifdef fpc}{$mode objfpc}{$endif}
uses
Classes, GenCollection;
type
// define a custom collection item and a custom collection
TStringItem = specialize TGenericCollectionItem<string>;
TStringCollection = specialize TGenericCollection<string>;
var
StringCollection: TStringCollection;
Item:TStringItem ;
begin
StringCollection := TStringCollection.Create;
try
StringCollection.Add.Value := 'First Item';
StringCollection.Add.Value := 'Second Item';
for Item in StringCollection do // automatic support for for in do
with Item do writeln(Value:10,Id:4);
finally
StringCollection.Free;
end;
readln;
end.
I only changed the mode and added two specialize and now it does not compile in Delphi

I guess that is what you want?

This whole exercise is about improving the wiki and the theory behind generics, nothing more, nothing less.
If you think it is warranted, I can do a full rewrite of the non-generic part too, but as was already mentioned by someone else in this thread, that is probably not the case.
Although I might lift, rework and move the notifications example, because that is not related to generics?