OpenSource For You

This month’s column continues the discussion on software bloat, and also covers software abstractio­n and abstractio­n penalty.

-

Welcome to a great new year! Last month, we had featured a bunch of programmin­g questions. Since I received the correct solutions to only a few of them, I would like to keep them open for this month as well. We will discuss the solutions in next month’s column. This month, let’s continue our discussion on software bloat, by looking at how software abstractio­n, a cornerston­e of modern programmin­g paradigms, contribute­s LQDGvHrWHQ­WOy Wo soIWwDrH LQHIfiFLHQ­Fy. These abstract data types are either directly supported by the language, as in functional languages like LISm, or supported through the standard library, as in the case of CHHLgava. For instance, CHH STL provides multiple abstract data types, such as set, list, map, queue or stack. Similarly, gava provides the Collection­s framework, which includes set, list and map. An Abstract Data Type (or ADT as it is popularly knownF provides an interface for a certain set of operations on particular kinds of data, shielding users from having to know how the data is represente­d, and how the operations are implemente­d. This enables an assembly-line kind of approach, wherein these ADTs can be assembled and used by the programmer to build complex software. For instance, programmer­s who use the CHH STL container ‘queue’ need not know how the ‘queue’ is implemente­d. They only need to know what operations are supported by ‘queue’, so that they can use it in their code.

In general terms, what users can do with ADTs can EH FODssLfiHG LQWo Wwo NLQGs oI oSHrDWLoQs: ‘TuHrLHs’ DQG ‘updates’. nueries are operations that compute results based on the data present in the ADT. They typically do not modify the ADT. On the other hand, updates are operations that update the ADT. The following table gives some of the oSHrDWLoQs suSSorWHG oQ WKH ‘OLsW’ A'T LQ C++ ST/:

 ??  ??

Newspapers in English

Newspapers from India