Monday, October 14, 2019
The C Programming Language And Its History
The C Programming Language And Its History Introduction In this Assignment, I shall be going through the stages and milestones, which lead to the development of two successful programming languages, C++ and Java. The programming language C influenced greatly C++, and therefore I felt it was necessary to delve deeply in this programming language as well. This assignment also includes the decisions taken by their respective creators and the reasoning behind them. The C Programming Language Between 1969 and 1973, the programming language C was under development at Bell Labs, by Dennis Ritchie. [1] During the same period, the operating system UNIX was under development as well.[1] In this section, I make most of my references to texts written by Dennis Ritchie himself in the book ââ¬Å"History of Programming Languagesâ⬠.[2] Prehistory Before C, during the late 60s, Bell Labs were passing through difficult times, mainly due to the fact that the development of the Multics project was halted because the beneficial use of the GE-645 Multics machine would not be available on time and would be too costly.[4] However, during and after the disposal of the machine, an ââ¬Å"informal teamâ⬠, lead by Ken Thompson, began to research and develop other alternatives.[4] Ken Thompson aimed in constructing a comfortable work environment by using any resources available to him.[4] His design involved implementing some similar ideas of Multics, such as ââ¬Å"an explicit notion of a process as a locus of control, a tree-structured file system, a command interpreter as a user-level program, simple representation of text files, and generalized access to devices.â⬠[4] However, Ken Thompson also excluded other certain aspects, including ââ¬Å"unified access to memory and to filesâ⬠.[4] Furthermore, instead of using PL/I which was the implementation language of Multics, Thompson and his team used another programming language known as BCPL.[4] Just like PL/I, BCPL was also a high-level language; a great advantage which Thompson did not want to let go due to its clarity and simplicity, unlike assembly language.[4] The B Programming Language In 1968, Ken Thompson was faced with a problem with the PDP-7, a machine for which he had no compatible software available.[4] Ken Thompson then created his own PDP-7 assembler, but it was in 1969, that Doug Mcllroy created the first high-level language for the system.[4] This language was an adaptation of the programming language known as TMG, which was created for the PDP-7 by R. M. McClure.[4] Dennis Ritchie describes TMG as ââ¬Å"a language for writing compilers (more generally, TransMoGrifiers) in a top-down, recursive-descent style that combines context-free syntax notation with procedural elementsâ⬠.[4] TMG had been used to create the compiler of PLI for Multics.[4] Ken Thompson then felt it was necessary for UNIX to have its own system programming language.[4] After a reluctant effort to use FORTRAN, Thompson later designed a new programming language named B.[4] The B programming language was developed mainly based on BCPL.[4] Moreover, Dennis Ritchie describes B as â⠬Å"BCPL squeezed into 8K bytes of memory and filtered through Thompsons brainâ⬠.[4] He then mentions that most probably, its name came about by representing a ââ¬Å"contractionâ⬠of BCPL.[4] However, he might have chosen it as a dedication to his wife Bonnie.[4] Development was first completed by creating a TMG version of B, where Thompson then rewrote B in itself.[6] Dennis Ritchie recalls that during this stage of development, Ken Thompson found the memory limitation to be a great challenge, as ââ¬Å"each language addition inflated the compiler to barely fitâ⬠.[6] However, each re-write, due to the beneficial feature, ââ¬Å"reduced its sizeâ⬠.[6] Dennis Ritchie continues by mentioning an example.[6] He stated that, originally coming from ALGOL 60, B generalized assignment operators such that x =+ y was used to add x to y.[6] The operator was then corrected to spell x += y back in 1976.[6] Thompson was more innovative as he created new operators such as ++ and to increment and decrement.[6] The position of these operators, written as postfix or prefix, would determine whether the change in value would ââ¬Å"occur before or after noting the value of the operandâ⬠.[6] Instead of producing machine code, the PDP-7s B compiler generated ââ¬Å"threaded codeâ⬠, in which the compilers output was made up ââ¬Å"of a sequence of addresses of code fragments that perform the elementary operationsâ⬠.[6] In the case for B, these operations worked on a straightforward stack.[6] However, due to the fact the PDP-7 machine was too small and slow, not much was written using B, ââ¬Å"except for B itselfâ⬠.[6] It only served them for experimental use. Re-writing UNIX on this machine proved to be too much of an expensive step.[6] Furthermore, Dennis Ritchie reports that at a stage, Ken Thompson expressed the ââ¬Å"address space crunch by offering a virtual Bâ⬠which made it possible for the interpreted program to take up more than 8k bytes.[6] This was done by ââ¬Å"paging the code and data within the interpreterâ⬠.[6] However, it was then concluded that it would not be feasible enough and would result in being too slow ââ¬Å"for the common utilitiesâ⬠.[6] Despite all this, some utilities were still written in B, such as an early version of the variable precision calculator known as dc.[6] Around this time, Dennis Ritchie also recalls working on an ââ¬Å"ambitiousâ⬠project, which mainly involved creating a genuine cross-compiler capable translating B to GE-635 machine instruction instead of thread code.[6] Dennis Ritchie then comments that this task was only possible due to the practicality and ease of the B language.[6] The Unix project had proven itself so well, that they managed to get a PDP-11 at Bell Labs.[6] By using the ââ¬Å"the threaded techniqueâ⬠in order to run programs written in B on this machine, it was only necessary to write ââ¬Å"the code fragments for the operators, and a simple assemblerâ⬠in which the latter, Dennis Ritchie created himself.[6] The ââ¬Å"first interesting programâ⬠to be tested on the PDP-11, before any operating system software, was dc.[6] Furthermore, around the same time, Ken Thompson managed to record the ââ¬Å"UNIX kernelâ⬠, along with some simple commands written in PDP-11 assembly language.[6] Later in his paper, Dennis Ritchie mentions that apart from Bs advantage regarding its simplicity, it also had its problems mainly related to the PDP-11.[7] He states that the machines, on which Bell Labs initially used BCPL and also B, were ââ¬Å"word-addressedâ⬠.[7] Furthermore, he continues by stating that these languages only handled one single data type, known as the ââ¬Å"cellâ⬠, which would simply be ââ¬Å"equated with the hardware machine wordâ⬠.[7] However, with the introduction of the PDP-11, a manifold of ââ¬Å"inadequacies of Bs semantic modelâ⬠were clearly visible, one of which was that its character-handling mechanisms tracking back to few changes from BCPL, were incompetent.[7] For instance, Dennis Ritchie mentions that ââ¬Å"using library procedures to spread packed strings into individual cells and then repack, or to access and replace individual charactersâ⬠did feel strange and at times ââ¬Å"even sillyâ⬠, on a machine based on bytes.[7] Despite that the first model of the PDP-11 was not capable of calculating floating-point arithmetic, the producer did affirm that this feature would be available shortly.[7] By defining special operators, floating-point operators were added to BCPL in their Multics and GCOS compilers.[7] However, these operators were only possible on certain machines where ââ¬Å"a single word was large enough to contain a floating-point numberâ⬠and therefore could not be used on the 16-it PDP-11.[7] Another inadequacy was that B and BCPL suffered from overhead due to pointers.[7] This was because the languages basis, ââ¬Å"by defining a pointer as an index in an array of wordsâ⬠, restricted pointers to be represented as ââ¬Å"word indicesâ⬠.[7] For each pointer reference, it generated ââ¬Å"a run-time scale conversionâ⬠from the pointer to the corresponding byte address intended by the hardware.[7] Due to all of these reasons, Dennis Ritchie realised that it was necessary to develop a ââ¬Å"typing schemeâ⬠to be able to handle characters and byte addressing, and also be prepared to work with the ââ¬Å"coming floating-point hardwareâ⬠.[7] At first, type safety and interface checking was not considered to be vital and therefore were introduced at a later date.[7] Besides the issues with the B language, B compilers threaded-code technique made programs run slower than the same programs written in assembly language.[7] NB and C In 1971, Dennis Ritchie started to expand the B language and called ââ¬Å"the slightly extended language NB, for new Bâ⬠.[7] Dennis Ritchie also states that since NB was used for a very short period, no documentation was done.[8] He continues by mentioning that he added a character type and also developed its compiler to produce PDP-11 machine code instructions.[8] Therefore, the compiler was capable of converting programs fast and small enough to contest with assembly language.[8] All in all, NB offered the simple types ââ¬Ëint and ââ¬Ëchar, arrays of them, and also pointers to them.[8] The semantics of arrays found in B and BCPL stayed the same.[8] Furthermore, inside procedures, the language interpreted pointers and array variables to be identical.[8] Ritchie explains that ââ¬Å"a pointer declaration created a cell differing from an array declaration only in that the programmer was expected to assign a referent, instead of letting the compiler allocate the space and i nitialise the cellâ⬠.[8] The values that were held in cells, linked by ââ¬Å"array and pointer namesâ⬠, were bytes of machine addresses relating to their respective memory location.[8] This was beneficial, as an ââ¬Å"indirectionâ⬠through a pointer required no ââ¬Å"run-time overheadâ⬠to form the pointer from a word to ââ¬Å"byte offsetâ⬠.[8] However, the machine code for ââ¬Å"array subscriptingâ⬠and ââ¬Å"pointer arithmeticâ⬠was dependant on the actual type of the array or pointer.[8] Dennis Ritchie states that although these semantics made it very easy to transition from B, problems eventually began cropping up mainly when he tried to ââ¬Å"extend the type notationâ⬠.[8] He continues by explaining his difficulty in implementing ââ¬Å"structured (record) typesâ⬠.[8] At first, it seemed structures should link correspondingly onto memory in the machine.[8] However, the major issue was that for a structure containing an array, there was no ideal location to store the pointer containing the base of the array, or a practical way to initialise it. [8] The goal of Dennis Ritchie was that a structure would not just ââ¬Å"characteriseâ⬠an abstract object but also ââ¬Å"describe a collection of bits that might be read from a directoryâ⬠.[8] He describes the solution in achieving this goal as ââ¬Å"the crucial jump in the evolutionary chain between type-less BCPL and typed Câ⬠.[8] Rather then having a ââ¬Å"materialization of the pointerâ⬠located in memory, the pointer would be created only when the array name is refereed to in an expression.[8] Moreover, values of type array, once mentioned in an expression, would change its values to pointers to direct to the objects making up the array.[8] Despite the fact that the semantics of this new language had shiftily changed, most code written in B could still be used. Furthermore, this language also differed from its predecessors as it offered a ââ¬Å"comprehensive type structureâ⬠and ââ¬Å"expression in the syntax of declarationâ⬠.[8] After creating the ââ¬Å"type system, the associated syntax, and the compilerâ⬠, Dennis Ritchie believed that this language deserved its own name, as when compared to NB, they were very distinctive.[8] Therefore, he called the programming Language C, ââ¬Å" leaving open the question whether the name represented a progression through the alphabet or through the letters in BCPLâ⬠.[8] UNIX benefited greatly due to C. It made improving and maintaining UNIX very easy for any programmer who had an understanding of C. [1] Furthermore, it also made UNIX easily portable for newly developed computers. [1] This is mainly because it was unnecessary to convert the operating system to assemble language manually, but only required a C assembly compiler for that particular machine. [1] This compiler translates the code into machine code that the device understands. [1] C has gained a huge amount of success over the years and is still presently used in development. It is mainly known for its fast speed. [1] The C++ Programming Language The book ââ¬Å"History of Programming Languagesâ⬠also contains a paper written by Bjarne Stroustrup, the creator of C++.[9] In this paper, he narrates the history of the C++ programming language, focusing more on the ideas, limitation and ââ¬Å"people that shaped the languageâ⬠.[9] Prehistory More or less, Stroustrup begins his paper by stating that C++ was based on an ââ¬Å"earlier versionâ⬠of a programming language known as C with Classes.[10] However, before going into further detail, he begins discussing the prehistory of all this.[10] At Cambridge University, whilst working on his Ph.D that dealt with the study of different methods regarding the organization of software for a distributed system, Stroustrup focused on developing software ââ¬Å"out of well-delimited modulesâ⬠and also created experimental simulator ââ¬Å"toolâ⬠in order to simulate ââ¬Å"software running on a distributed systemâ⬠.[10] This first version of the simulator was developed in Simula and ran on the Universitys IBM 360/165 mainframe.[10] It was very beneficial for Bjarne Stroustrup to use Simula, stating that: ââ¬Å"the features of Simula were almost ideal for the purpose and I was particularly impressed by the way the concepts of the language helped me think about the problems in my applicationâ⬠.[10] Particularly, the behaviour of classes allowed Stroustrup to link directly the application of his ideas to the language constructs easily, especially due to the fact that classes in Simula are able to behave as co-routines.[10] He states that the use of class hierarchies enabled him to declare ââ¬Å"variants of application level conceptsâ⬠.[10] He continues by explaining further, through an example, that different types could be described as classes deriving from other classes.[10] The following are his exact words: ââ¬Å"For example, different types of computers could be expressed as classes derived from class computer and different types of intermodule communication mechanisms could be expressed as class es derived from class IPCâ⬠.[10] Other benefits of Simula were its type scheme and the ability to detect type errors through its compiler.[10] The detection of a type error was either caused by some ââ¬Å"sillyâ⬠mistake, or due to some ââ¬Å"conceptual flawâ⬠in the design, in which both cases, especially the latter, helped Stroustrup greatly.[10] He had not experienced such beneficial use with other ââ¬Å"more primitive strong type systemsâ⬠.[10] Furthermore, referring to his simulator, when the program increased in size, due to Simulas class, co-routine and precise type checking mechanisms, flaws and errors would not grow alongside.[10] On the other hand, the implementation of Simula did not ââ¬Å"scale in the same wayâ⬠and nearly resulted in creating a disastrous program.[10] Stroustrup concluded that Simula was ideal for writing small programs but suffered ââ¬Å"inherentlyâ⬠for larger ones due to its poor run-time performance characteristics.[10] Today, Simula implementations have improved greatly, but at that time, in order to avoid terminating the project, Stroustrup rewrote the simulator in BCPL.[10] He found programming in BCPL a very ââ¬Å"horribleâ⬠experience, mainly due to its lack of type checking and run-time help.[10] However, once the simulator was developed, the program ran competitively fast.[10] Once he graduated from Cambridge, Bjarne Stroustrup promised himself that he would never attempt to solve a problem with those impractical tools as he had ââ¬Å"suffered while designing and implementing the simulatorâ⬠.[10] However he did define what is a ââ¬Å"suitable toolâ⬠for writing system programs, which was highly significant when he was developing C++. [10] In Stroustrups eyes, a ââ¬Å"suitable toolâ⬠involved the following characteristics.[10] Firstly, it would have Simulas support for program organisation and thus include classes, the ability to form class hierarchies, concurrency mechanisms, and a good type-checking scheme relating to classes.[10] Secondly, it must also be capable of producing programs possessing similar speed as to BCPL programs, and also allow the combination of independently compiled units into a program.[10] Lastly, it must allow the ability to create highly portable implementations.[10] C with Classes The undertaking, which eventually lead to developing C++, began in 1979, when Bjarne Stroustrup tried to understand the UNIX kernel, in order to find out the limit that could be distributed over a network of computer via a local area network (LAN).[11] This work took place in the Computer Science Research Center of Bell Laboratories.[11] With little time, Stroustrup faced two sub-problems, namely, ââ¬Å"how to analyse the network traffic that would result from the kernel distribution and how to modularize the kernelâ⬠.[11] They both required a way to describe the model structure of a complicated system and the communication trends of the modules, issues extremely similar to the kind that Stroustrup was eager to never have to face again without the suitable tools.[11] Therefore, by referring to the criteria he had stated upon leaving Cambridge, Bjarne Stroustrup began to develop his own suitable tool.[11] By October of 1979, he had a preprocessor called Cpre. [11] Cpre was able to add ââ¬Å"Simula-like classes to Câ⬠, and in March of 1980 this processor had been upgraded to actually support one ââ¬Å"real project and several experimentsâ⬠.[11] Later that year, between April and October, Stroustrup mentions that he let go of the ideal of ââ¬Å"thinking about a toolâ⬠but rather began ââ¬Å"thinking about a languageâ⬠, to develop what is known as C with Classes.[11] However, initially, he did not consider C with Classes to be an independent language but just an expansion to C for ââ¬Å"expressing modularity and concurrencyâ⬠.[11] C with classes did not support primitives for expression.[11] Instead it included a mix of inheritance and offered a way to define class member functions with ââ¬Å"special meaningsâ⬠understood by the preprocessor, which was used to develop the library that handled the required ââ¬Å"stylesâ⬠of concurrency. Stroustrup emphasises on the word ââ¬Å"stylesâ⬠and that it is written in plural.[11] He found it vital that numerous notations of concurrency are able to be expressed in the language.[11] Backed by colleagues, other C++ users and the C++ standards committee, to this day he still believes that this was the right decision.[11] He then continues on this topic by stating that there in ââ¬Å"no one dominant model for concurrency supportâ⬠, and making use of a library or a special purpose extension for support on a particular form of concurrency would not limit others in using different forms.[11] Therefore, ââ¬Å"the language provided general mechanisms for organising programs rather than support for specific application areasâ⬠.[11] It was not only in this instance that Bjarne Stroustrup did not force programmers to use a particular style.[11] C is capable of computing numerous low-level operations, such as bit manipulation and choosing between different sizes of integers.[11] Furthermore, although C++ systematically eliminates the need to use such low-level operators due to safety, they are still available for programmers to use, as Bjarne Stroustrup did not wish to restrict them in any way.[11] In fact, quoting his exact words, he states ââ¬Å"I strongly felt then, as I still do, that there is no one right way of writing every program, and a language designer has no business trying to force programmers to use a particular style.[11] The language designer does, on the other hand, have an obligation to encourage and support a variety of styles and practices that have proven effective and to provide language features and tools to help programmers avoid the well known traps and pitfallsâ⬠.[11] Bjarne Stroustrup continues his paper by explaining further the features available to C with class, a language considered to be a stepping stone in creating C++.[11] C with Classes does not differ greatly compared to C.[11] Due to the fact that a preprocessor was used to implement C with Classes, the language differs only in the newly added features.[11] He lists these features which are shown as below. Note that the last three features were implemented in 1981, whilst the others were implemented one year earlier.[11] ââ¬Å"classesâ⬠[11] ââ¬Å"derived classesâ⬠[11] ââ¬Å"public/private access controlâ⬠[11] ââ¬Å"constructors and destructorsâ⬠[11] ââ¬Å"call and Return functionsâ⬠[11] ââ¬Å"friend Classesâ⬠[11] ââ¬Å"type Checking and Conversion of Function argumentsâ⬠[11] ââ¬Å"inline functionsâ⬠[11] ââ¬Å"default argumentsâ⬠[11] ââ¬Å"overloading of the assignment operatorâ⬠[11] One of the major features offered by C with Classes was the idea of classes.[12] Stroustrup describes a class as a ââ¬Å"user-defined data typeâ⬠, meaning that it is a custom data type created by the programmer.[12] He continues by stating that ââ¬Å"a class specifies the type of the class members that define the representation of a variable of the type, specifies the set of operations that manipulate such objects and specifies the access users have to these membersâ⬠.[12] In other words, it simply defines the attributes and methods of a data type, including their access rights.[12] At that time, Simula did not support local or global variables of class types, and therefore objects of classes had to be ââ¬Å"allocated on the free store using the new operatorâ⬠.[12] After developing his simulator earlier in Cambridge, he considered Simulas lack of support on variables of class types as a ââ¬Å"major source of inefficiencyâ⬠at run-time.[12] Moreover, after some time, Karel Babcisky, who worked at the Norwegian Computer Centre, published information on ââ¬Å"Simula run-time performanceâ⬠that backed Stroustrups thinking. For this reason, Stroustrup wanted to support local and global variables of class types.[12] The first version of C with Classes did not support ââ¬Å"Inline Functionsâ⬠, and therefore was not initially advantageous of the languages representation. Stroustrup, in his book, ââ¬Å"The C++ Programming Languageâ⬠, describes an inline specifier on a function as a ââ¬Å"hintâ⬠to the compiler that it should try to create code for a call.[5] He introduced inline functions to avoid programmers ââ¬Å"crossing a protection barrierâ⬠that otherwise would result in not allowing the classes to be used hide representation.[12] Another concept, which Stroustrup thought about deeply, was the linkage model. Stroustrup starts explaining this by stating that to a certain extent, the way compiled programs might link to one another, ââ¬Å"determines the features the language can provideâ⬠.[12] At the time of implementing C with Classes and C++, he had taken certain decisions regarding this issue. Firstly, that ââ¬Å"separate compilation should be possible with traditional C/FORTRAN UNIX/DOS style linkersâ⬠.[12] Secondly, type safety should be checked on linkages.[12] Thirdly, it is not necessary for a linkage to need some sort of database, but a database could be beneficial in order to straighten the intended implementation.[12] Lastly, ââ¬Å"linkage to program fragments written in other languages such as C, assembler and FORTRAN should be easy and efficientâ⬠.[12] Bjarne Stroustrup also added static types to his language implementation.[12] By his experience with Simula and ALGOL 68, he considered this to be essential in supporting static types.[12] The only difficulty for him was how to implement it.[12] In order not to break C code, Stroustrup decided that he would allow the ââ¬Å"call of an undeclared functionâ⬠and not test type safety on such ââ¬Å"undeclared functionsâ⬠.[12] However, this was a gaping hole in the type system and a great effort was made to lessen the problems relating to this issue.[12] C with Classes had lost the capability to detect run-time errors caused by ââ¬Å"simple type errorsâ⬠.[12] Due to the fact that most programmers that worked with C were reliable on type checks available, finding simple errors was tedious when programming in C with Classes.[12] Thus, a great demand arose to strengthen C with Classs type system.[12] Eventually, in C++ the issue had been solved by ââ¬Å"making a call of an undeclared function illegalâ⬠.[12] Derived classes were also another concept which Stroustrup implemented.[14] However, the C with Classes language did not support Simulas concept of virtual function until later with the introduction of C++.[14] Similar to Simulas prefix class notion and Smalltalks subclass concept, C++ also supported derived classes.[14] However, Stroustrup gave the names ââ¬Å"derived classâ⬠and ââ¬Å"base classâ⬠, mainly due to the fact that he, along with others, had difficulty in recalling what was ââ¬Å"subâ⬠and what was ââ¬Å"superâ⬠.[14] Furthermore, a number of people believed it to be ââ¬Å"counterintuitiveâ⬠as a subclass usually ââ¬Å"has more inform than its superclassâ⬠.[14] Although there was no support of virtual functions within C with Classes, derived classes were beneficial for creating new data structures based on older ones and linking operations with the resulting types.[14] However, programmers could have simply used an object of a derived c lass and consider its base class as ââ¬Å"implementation detailsâ⬠.[14] Towards the middle of his paper, Stroustrup mentions the reasons why he chose the programming language C to extend on, rather than Pascal.[13] Although he points out that C is not the ââ¬Å"cleanest language ever designed nor the easiest to useâ⬠, he selected C due to its flexibility, efficiency, availability and portability.[13] C++ Between 1982 and 1984, Stroustrup developed the popular programming language C++. Initially known as C84, it was later changed to C++ because C84 was described by Stroustrup as ââ¬Å"uglyâ⬠and ââ¬Å"institutionalâ⬠. Compared to C with Classes, C++ includes major upgrades and new features. Listed by Stroustrup, these major additions include: ââ¬Å"Virtual functionsâ⬠[15] ââ¬Å"Function name and operator overloadingâ⬠[15] ââ¬Å"Referencesâ⬠[15] ââ¬Å"Constants (const)â⬠[15] ââ¬Å"User-controlled free-store memory controlâ⬠[15] ââ¬Å"Improved type checkingâ⬠[15] The ability to overload an operator was in demand by many.[16] Stroustrup too liked the concept, and to him, ââ¬Å"Operator overloading looked neat.[16] Although, through his experience of ALGOL 68, he had an idea on how overloading ââ¬Å"could be made to workâ⬠, at first he was ââ¬Å"reluctantâ⬠, to add it to C++.[16] The reason for this was that Overloading was known to be hard to implement and therefore resulted in compilers increasing in size.[16] It was also known to be ââ¬Å"inherently inefficientâ⬠and made code ââ¬Å"incomprehensibleâ⬠.[16] However, if this reputation proved to be incorrect, Bjarne Stroustrup, at that time, admitted that overloading would solve a lot of C++ user problems.[16] He was convinced that overloading would not result in inherent inefficiency.[16] Furthermore, he mentions that ââ¬Å"overloading makes code obscureâ⬠and it would make their code appear ââ¬Å"cleanerâ⬠.[16] He also observed the way Overloading would w ork with classes, and he prepared manual papers to show that the added complexity would not pose any problems.[16] Due to all these reasons, in addition to two hours of work in implementing overloading in C front for demonstrations, Stroustrup had convinced himself to include overloading to C ++.[16] Among other features, the concept of referencing was added to C++.[16] References were initially added to support overloading.[16] C passed arguments by value.[16] If passing an object by value would result in inefficiency, the programmer is able to pass a pointer.[16] However, overloading operators did not permit this strategy.[16] Therefore, due to the fact that C ++ supports both pointers and references, it does not need means for ââ¬Å"distinguishing operations on the reference itself from operations on the object referred toâ⬠.[16] From the initial version of C ++ to the C++ currently available today, a lot of updates and versions were released.[17] Version 2.0 was a great improvement.[17] Amongst other features, it mainly introduced abstract classes and multiple inheritance.[17] Multiple inheritance allows users to have more than one direct base class.[17] However, Stroustrup did admit that adding multiple inheritance in version 2.0 was a mistake, as he felt that this concept was less important than adding ââ¬Å"parametrized typesâ⬠.[17] Parametrized types were later added in version 3.0.[17] The Java Programming Language The Java Programming Language was developed by a team Sun Microsystems engineers, led by James Gosling[3]. The project started in 1991 and was released in 1995.[3] Prehistory Back in the late 1970s, Bill Joy, the man who many still believe was the first to come up with the ââ¬Å"idea of a programming language that later became Javaâ⬠, wanted to create a language that would consist of the best features of MESA and C.[3] Having attempted to re-write UNIX in 1980, he realised that C++ was ââ¬Å"inadequateâ⬠to accomplish this task.[3] He wanted a much more powerful tool that is able to write short and effective programs. [3]This longing started to become a reality in 1991, when Sun Microsystems began to develop a language induced by Joys idea.[3] The Suns project was initially known as the ââ¬Å"Stealth Projectâ⬠named by Scott McNealy.[3] It was during January of that year, when James Gosling, Mike Sheradin, Patrick Naughton and Bill Joy, along with others, organized a meeting in Aspen Colorado, to discuss their ideas for this project.[3] The main aim of the Stealth Project was to conduct research in the area of computers use in the ââ¬Å "consumer electronics market.[3] The major objective was to create a ââ¬Å"smartâ⬠consumer electronic device that would accept instructions from a ââ¬Å"handheld-romote-control-like deviceâ⬠.[3] In Goslings words, he states that ââ¬Å"the goal was â⬠¦ to build a system that would let us do a large, distributed, heterogeneous network of consumer electronic devices all talking to each-otherâ⬠.[3] The Stealth Project later came to be known as the Green Project.[3] The work that was done by the team was divided as follows: Mike Sheradin worked on business development, Patrick Naughton focused mainly on the graphics system, whilst James Gosling took the task of finding the proper language to use for the project. [3]Before joining Sun in 1984, James Gosling created ââ¬Å"the commercially unsuccessful NeWs windowing system as well as GOSMACSâ⬠.[3] As described by the site, GOSMACS was ââ¬Å"a C language implementation of GNU EMACS.[3] Oak Programming Language The language James Gosling initially had chosen to use for Green Project was C++.[3] However, after some time working on it, he found it inadequate for the required task.[3] Therefore, he began adding extensions and changes to C++, which were described as the first building blocks in developing an independent language that would fit ideally to achieve the projects objectives.[3] Gosling named the language ââ¬Å"Oakâ⬠, while he was staring at an oak tree though his office window.[3] However, some time after, the name was abolished mainly due to the fact that the name had already been in use for another programming language.[3] In fact Gosling stated that ââ¬Å"the Java development team discovered that Oak was the name of a programming language that predated Suns language, so another name had to be chosenâ⬠.[3] It was later called Java. Gosling recounted that ââ¬Å"its surprisingly difficult to find a good n
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.