Implementation of Arrays Explained

Arrays can be applied in a wide variety of use cases. In programming, arrays are used to reserve multiple variables in the compiler’s memory space to be used at a later time. The biggest advantage of using an array is the ease of declaring or reserving hundreds, if not thousands, of variables all at once. Therefore, arrays are similar to that of classes. The only difference though is that for classes, they are fully functional pieces of programs, whereas arrays are just a bucket list of reserved, declared, and not yet initialized variables. Similarly, where there are advantages, there are drawbacks, and the biggest drawback for arrays is when the programmer themselves fails to understand the project requirements and initialize tens of hundreds of arrays of useless unused variables. In that case, it will only inflate the size of the program and otherwise do no good for program execution. Therefore, it is important for the programmer to know precisely when to use arrays and use them properly. When used appropriately, arrays could vastly decrease debugging difficulties while also improving readability.

Responses to the professor or other students

Response #1: I like how you’ve mentioned the list function in python. It is definitely very similar to that, although there are definitely some key differences. I believe the python language was primarily designed to be flexible and to achieve the highest execution efficiency. Therefore, it was made to be flexible to be able to store variables of different data types. In contrast, C++ and Java were originally made for designing complex functional programs. In that case, these languages needed to be particularly intricate and restricted to achieve maximum uniformity. I’ve mentioned in my post that arrays are quite similar to that of classes, but the key difference is that classes are modules of codes that can be executed individually and in conjunction with other modules or classes of codes.

Response #2: Yes, you are right on point. Arrays provide a single group name to multiple variables. This will significantly improve the readability of the overall coding project. I have also mentioned in my post that it is quite similar to that of classes, which we haven’t covered. But basically, classes are chunks of codes that serve a particular use case within a program and are used in conjunction with other modules or classes of codes.

Leave a comment