Overloading

 

Digital Computer Software Class Creation

Programming language classes have been in existence since the first programming languages came into being (FORTRAN, COBOL, Pascal, etc.). Each class consisted of a series of machine code statements that were inserted into memory by the compiler to achieve the assigned task. For example, the initial printf FORTRAN statement that sent text to a printer initiated a sequence of 795 8-byte (64-bit) machine code statements when the program was loaded into the computer. When the 8-byte word was later replaced by a 32-byte word in the early 1990s, the number of words in the printf machine code set was reduced to 80 statements.

It was not unusual to find that printf() at a major compiler manufacturer was the sole responsibility of one programmer/analyst and he or she either became rich and famous or was drummed out of the programmer corps, based on the performance of printf(). (This was a particularly nasty class because printer manufacturers kept switching their required inputs for their printers. Microsoft put a stop to this wild-catting in the late 1990s.)

These classes (like printing, file services, logic, etc.) were placed in large machine code files that were subsequently included in the compiling process by the famous *.h declaration files. The compiler copied the machine code that it needed into the executable file and ignored the rest. This system (machine-code files that supported each of the statements in a compiler) worked well for a generation or two because the machine-code builders specified a fixed number of input parameters (arguments) for each of the mini tasks that a computer performed.

Then their world fell apart when some high-minded computerists demanded the capability to overload these familiar functions ” providing the programmer with a basic function that allowed as little as one input parameter and a maximum of 10 to 12 input parameters. The programmer used whatever form of the machine-code function was most useful at the time. The concept was simple, but the implementation of the concept in the world of machine-code creation was mind-boggling. Mind-boggling or not, the basic computer tasks were all successfully overloaded over a period of several years .

With the advent of extremely high-speed CPUs in the 1990s and 2000s that were capable of addressing billions of memory locations on one s computer, it was time to look seriously at the object-oriented programming concepts that a compiler language named Smalltalk had introduced in the early 90s. Smalltalk s secret was that it found a way to instantiate a portion of a software class and create an object that was a sequence of machine code commands, ready to perform in one s computer on command. The object was allowed to float out in memory until it was needed.

Today we instantiate (create) objects with the universal compiler word new.

 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net