News for hackers. Stuff that matters.
Re:One Way to Represent Things by galaxyLogic on Thursday February 25, 2021 @02:21PM (#26266976)
The "base datatypes" have to be accessed somehow. If you have base-type Array you have to access its elements somehow. In C-type language you would access the elements by calculating a memory-offset and reading that location in memory. The problem is that now your code depends on elements of Array being stored in memory in specific (relative) locations.

Whereas in an Object Oriented language you would access the elements by calling a method myArray.at(123). The benefit is you don't need to know how that data is stored or where.

In OOP the elements of an Array of course can be Arrays too, whose elements you can similarly only access via a method-call.

There are no comments on this comment yet.