Example: confidence

Evaluating the G Programming Language with Design Patterns

Evaluating the GOProgramming Language withDesign PatternsbyFrank SchmagerA thesissubmitted to the Victoria University of Wellingtonin partial fulfilment of therequirements for the degree ofMaster of Sciencein Computer University of Wellington2010 AbstractGOis a new object-oriented Programming Language developed at Googleby Rob Pike, Ken Thompson, and the potential to become amajor Programming Language . GOdeserves an Patterns document reoccurring problems and their problems presented are Programming Language independent. Theirsolutions, however, are dependent on features Programming this thesis we use Design Patterns to evaluateGO. We discussGOfeatures that help or hinder implementing Design Patterns , and present apattern catalogue of all 23 Gang-of-Four Design Patterns , we present GoHotDraw, aGOport of the pattern densedrawing application framework JHotDraw.

Abstract GO is a new object-oriented programming language developed at Google by Rob Pike, Ken Thompson, and others. GO has the potential to become a major programming language. GO deserves an evaluation. Design patterns document reoccurring problems and their solutions.

Tags:

  Programming, Language, With, Design, Evaluating, Patterns, Programming language, Evaluating the g programming language with design patterns

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Evaluating the G Programming Language with Design Patterns

1 Evaluating the GOProgramming Language withDesign PatternsbyFrank SchmagerA thesissubmitted to the Victoria University of Wellingtonin partial fulfilment of therequirements for the degree ofMaster of Sciencein Computer University of Wellington2010 AbstractGOis a new object-oriented Programming Language developed at Googleby Rob Pike, Ken Thompson, and the potential to become amajor Programming Language . GOdeserves an Patterns document reoccurring problems and their problems presented are Programming Language independent. Theirsolutions, however, are dependent on features Programming this thesis we use Design Patterns to evaluateGO. We discussGOfeatures that help or hinder implementing Design Patterns , and present apattern catalogue of all 23 Gang-of-Four Design Patterns , we present GoHotDraw, aGOport of the pattern densedrawing application framework JHotDraw.

2 We discuss Design and im-plementation differences between the two frameworks with regards would like to express my gratitude to my supervisors, James Nobleand Nicholas Cameron, whose expertise, understanding, and patience,added considerably to my graduate experience. They provided timely andinstructive comments and evaluation at every stage of my thesis process,allowing me to complete this project on would also like to thank my family for the support they provided methrough my entire life and in particular, I owe my deepest gratitude to mybeautiful wife Mary, without whose love and moral support I would nothave finished this work for this thesis has been conducted in collaborationwith my supervisors and published at the PLATEAU 2010 workshop [83].

3 Frank SchmageriiiivContents1 ..22 .. of GO.. of GO.. Patterns .. Patterns vs Language features .. Self .. Evaluations .. Critiques .. of Programming Languages for Evaluations .. on GO.. 183 Design Patterns in Patterns ? .. or Composition .. Classes .. Class Functions .. Self .. Method .. Hiding .. ade .. 334 Case Study: The GoHotDraw .. Design of GoHotDraw .. of GoHotDraw and JHotDraw .. Self in the Figure Interface .. User Interface .. Handling .. 565 Self .. Type Hierarchies .. Embedding .. and Structural Subtyping .. Creation .. and Function Overloading.

4 Code Organization .. Receiver Naming .. Data Structures .. Visibility .. Return Values .. Values .. 686 Work .. Work .. 72A Design Pattern Creational Patterns .. Abstract Factory .. Builder .. Factory Method .. Prototype .. Singleton .. Structural Patterns .. Adapter .. Bridge .. Composite .. Decorator .. Fac ade .. Flyweight .. Proxy .. Behavioral Patterns .. Chain of Responsibility .. Command .. Interpreter .. Iterator .. Mediator .. Memento .. Observer .. State .. Strategy .. Template Method.

5 Visitor .. 170 Bibliography175 Chapter 1 IntroductionGOis a new Programming languages developed at Google by RobertGriesemer, Rob Pike, Ken Thompson, and publishedin November 2009 and made open source; was Language of the year 2009 [7]; and was awarded the Bossie Award 2010 for best open sourceapplication development software [1]. GOdeserves an Patterns are records of idiomatic Programming practice andinform programmers about good program Design . Design Patterns providegeneric solutions for reoccurring problems and have been implemented inmany Programming languages. Every Programming Language has to solvethe problems addressed by Patterns . In this thesis we use Design patternsto evaluate the innovative features of this thesis we presents our experiences in implementing the designpatterns described inDesign Patterns [39], and the JHotDraw drawing editorframework inGO.

6 We discuss differences between our implementationsinGOwith implementations in other Programming languages (primarilyJava) with regards to 1. ContributionsWe present: an evaluation of the GOprogramming Language . GoHotDraw, aGOport of the pattern dense drawing applicationframework JHotDraw. a pattern catalogue of all 23 Design Patterns described inDesignPatterns[39]. OutlineThe remainder of this thesis is organized as follows:Chapter 2 gives background information concerningGO, Design Patterns ,and Programming Language 3 discusses selected Design Patterns with regards toGO s 4 describes GoHotDraw and highlights Design and implementationdifferences to its predecessor 5 evaluates 6 presents our conclusions, emphasizes this thesis s original con-tributions, and discusses possibilities for extending this work in the 2 BackgroundIn this chapter we give background information necessary for understand-ing the remainder of the thesis.

7 In Section we describe the history ofGO the languages and developers that influenced the Design ofGO andgive necessary information aboutGOlanguage features; in Section weintroduce Design Patterns ; and in Section we review existing literatureon Language an object-oriented Programming Language with a C-like designed as a systems Language , has a focus on concurrency, and is expressive, concurrent, garbage-collected [4].GOwas developed byRob Pike, Ken Thompson and others at Google in 2007 [5] and was madepublic and open source in November a mixture of staticand dynamic typing, and is designed to be safe and efficient. A primarymotivation is compilation speed [70].34 CHAPTER 2. History of GOGOis inspired by many Programming languages, environments, operatingsystems and the developers behind them.

8 Ken Thompson developed the Bprogramming Language [50] in 1969, a predecessor of the C programminglanguage [82] developed by Dennis Richie in 1972. C is the main program-ming Language for the Unix operating system [55], the latter developedinitially by Thompson, Richie and others. Many of today s languages havea C-like syntax (C++, Java, C]).Communicating Sequential Processes (CSP) [47] was developed by R. Hoare in 1978. Hoare introduces the idea of using channels forinterprocess communication. CSP s channels are unbuffered, a processdelays until another process is ready for either input or output on a s channels are also used as guards for process synchronization: aprocess waits for multiple processes to finish by listening on multiplechannels for input and continues once a signal has arrived on a s approach to concurrency and interprocess communication was highlyinfluential for, amongst others, Occam [27] and Erlang [91].

9 In 1985 Luca Cardelli and Rob Pike developed Squeak [23], a languageto demonstrate the use of concurrency for handling input streams of userinterfaces. Squeak was limited in that it didn t have a type system, dynamicprocess creation or dynamic channel creation. Pike redesigned Squeak asNewsqueak in 1989 remedying Squeak s limitations [69]. Newsqueak wassyntactically close to C, had lambda expressions and theselectstatementfor alternations. Newsqueak introduced:=for declaration-and-assignmentand the left arrow<-as communication operator (the arrow points in thedirection information flows) [74].In 1992 Thompson, Winterbottom and Pike developed the operatingsystem Plan 9 [75]. Plan 9 was intended to become the Unix 9 was widely used within Bell Labs, and provided the programminglanguage Alef [95], developed by Winterbottom.

10 Alef is a compiled C-like Language with Newsqueak s concurrency and communications Alef was not garbage collected and concurrency was hard todo with the C-like memory and Pike went on to develop Inferno [31] in 1995, asuccessor to Plan 9. They also developed the Limbo Programming Language [32] used to develop applications for Inferno. For Limbo, Winterbottomand Pike reused and improved Alef s abstract data types and Newsqueak sprocess management [53].Thompson and Pike s experience and involvement in the developmentof Unix, C, Plan 9, Inferno and Limbo have clearly influenced the Design ofGO. GOdraws its basic syntax from s interprocess communicationis largely influenced by CSP and its successors as outlined typed channels which can be buffered and unbuffered;GO sselectstatement implements the process synchronization mechanism describedby Hoare and implemented in s compiler suite is basedon Plan 9 s compiler suite.


Related search queries