Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Oberon's object oriented model differ from standard OOP? [closed]

I've been reading Wirth's books on Oberon--or at least trying to--and I'm hitting a mental road block when it comes to figuring out what is going on regarding object oriented programming in Oberon.

I know his method is supposed to simplify object oriented programming by avoiding "standard" OOP syntax, which he labels a perpetration, as if it was somehow criminal, and maybe I'm just too rooted in class, method, etc... kind of thinking, but can someone translate Oberon's method into standard OOP language, or at least conceptually explain it.

like image 856
clay Avatar asked Oct 21 '25 06:10

clay


1 Answers

You may get some insight by comparing Ada's tagged type, examined in Ada 95 Rationale: II.1 Programming by Extension, with Oberon-2's type tag, discussed in Object-Oriented Programming in Oberon-2: Run-Time Data Structures, cited here. Both use a record structure with hidden type information to implement inheritance and polymorphism. See also A Comparison of the Object-Oriented Features of Ada 95 and Java, cited here.

Addendum: So are they simply associating procedures with records?

An Oberon record type encapsulates both procedures and data, in a manner similar to the object type in Object Pascal. An Ada tagged record encapsulates the data, while the enclosing package encapsulates the subprograms and record.

like image 149
trashgod Avatar answered Oct 25 '25 09:10

trashgod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!