Hacker News new | ask | show | jobs
by Rochus 1824 days ago
Thanks. Generic modules turned out to be a good fit for Oberon; I can even validate the generic modules before instantiation and even without type constraints; assumptions about types can be hidden using procedure types which is also a good fit for Oberon (I can still add type constraints later if really necessary). The concept is actually mostly inspired by Ada, including the explicit instantiation. It was the first approach I tried, then I switched to the Roe/Szyperski proposal for some time, but which turned out to cause to many complicated rules and consequences not in harmony with the Oberon philosophy, why I finally switched back to generic modules. The approach indeed has similarities with Modula-3, but the instantiation is simpler, and the generic parameters are types, not module interfaces.