The Nodes and Links are added starting from the given node and walking up the parent chain. Sets maintain the order in which things were added, called the “insertion order”, but you cannot change the order because there’s no sort method. In v3, the GoJS Set class uses the built-in JavaScript Set class, for example: Set.prototype.forEach() - JavaScript | MDN
In GoJS v1.0 there wasn’t any built-in JavaScript Set or Map class, so we had to design and implement our own. Times have changed…