Is anyone out there who has used classes (type 4) in a project on the mainframe (with the purpose to componentize a system).
What are you findings (pros/cons)?
I have tried to use classes and I noticed that it works recently well. I also see some interesting use cases. One of the things which are difficult to use are design patterns. Using classes opens up the possibility to apply design patterns (maybe not the whole set of the GoF, but this has to be investigated).
One of things you might for example accomplish (I have not tested it yet, but I will) is to implement observer pattern. I could for example implement a subject that sends out notifications to one or more observers, e.g. reading a work file and sending the records to any observer that’s interested. This is very hard (if not impossible) to implement using a procedural language. The only downside of this approach is that Natural that does not support multithreading (or does it?), since I do not want this process to be executed on one thread (it will block the executing thread).