138x Filetype PDF File size 1.12 MB Source: www.ida.liu.se
Lectures 1Introduction 2Concepts and models of programming languages 3Declarative Computation Model 4Declarative Programming Techniques 5Declarative Computation Implementation TDDA69 Data and Program Structure 6Declarative Concurrency 7Message Passing Concurrency 8Explicit State and Imperative Model Summary 9Imperative Programming Techniques 10Imperative Programming Implementation Cyrille Berger 11Shared-State Concurrency 12Relational Programming 13Specialized Computation Models 14Macro 15Running natively and JIT 16Garbage Collection 17SSuummmmaarryy 2 / 34 Programming Paradigms Lecture content Summary Choosing an appropriate Programming Language Paradigm The different types of interpreter GUI Programming 3 / 34 4 / 34 Do we need new programming languages? New Concepts in the early days, object orientation New problems and new infrastructure Summary Multi-threading Distributed computing ... Develop a better syntax 6 / 34 Motivation for creating Rust Motivation for creating Go Rob Pike, Go creator: ‟A couple of years ago, several of us at Google became a little Graydon Hoare, Rust creator: ‟A lot of oobbvviioousus ggoooodd iiddeeaass, known and loved in other frustrated with the software development process, and particularly using C++ to languages, hahavveenn''tt mmaaddee iitt into widely-used systems languages, or are deployed in write large server software. We found that the bbiinanarriieess tteendndeedd ttoo bbee mmucuch h ttoooo bbiigg. languages that have very poor (unsafe, concurrency-hostile) memory models. There They took ttoooo lloongng ttoo ccoommppiillee. And the language itself, which is pretty much the were a lot of good competitors in the late 70s and early 80s in that space, and I main system software language in the world right now, is aa vveerry y oolldd llaangnguauaggee. A lot wanted to rreevviivvee ssoommee ooff ttheheiirr iiddeeaass and give them another go, on the theory that of the iiddeeaass aandnd cchahangngeess iin n haharrddwwaarree that have come about in the last couple of circumstances have changed: the internet is highly concurrent and highly security- decades haven’t had aa cchahancncee ttoo iinfluenfluencncee CC++++.” conscious, ssoo tthehe ddeessiiggn-n-ttrraaddeeooffffss tthahatt aallwwaayyss ffaavvoorr CC aandnd CC++++ ((ffoorr eexxaammppllee)) hahavvee bbeeeen n sshihiffttiingng.” 7 / 34 8 / 34 Is it easier to change and fix existing languages? Usage of C++ vs Go vs Rust Backward-compatible changes Backward-incompatible changes Some changes are too difficult Introducing Unicode in Python and PHP Garbage collector in C++ Those changes introduce long development time and long acceptance time Python 3.0 was introduced in 2008 PHP 6 was started in 2006 and never released, PHP 7 released in December 2015 9 / 34 10 / 34 Design Considerations for a Programming Language PHP Criticism A programming language must be: PHP was not designed, but developed pprreeddicictabtabllee Inconsistent naming of functions and order of their parameters Source code is read more often than written, a human must be able to understand what he read Some function names were chosen to improve the distribution of hash values Rather than aborting with an error, PHP will try to guess the developer intent ccoonsnsisistetentnt Problems with weak typing Knowing part of a language should help learn other parts PHP compilation options, server configurations, applications configurations and ccooncncisisee, ssimimppllee and ggeenenerralal global states can affect function behaviour rreelliabiabllee Incoherent mix between functional and object-oriented programming Programming language are here to solve problem, not to introduce new one ... ddeebbugugggababllee Developers will inevability write bugs, they need all the help they can get to find them You need a vision and a design when developing imimpplleemmeentabntabllee a programming language! This reduce the number of bugs in the language implementation 11 / 34 12 / 34 Design choices for a Programming Language What is the purpose of the new language? First question is, a new language, what for? Programming Paradigm Querying knowledge? Dynamic vs Static (Typing...) Distributed numerical computation? Writting drivers for an Operating System? Low-level vs High-level Writting web applications? Answering the Ultimate Question of Life, the Universe, and Direct interpretation, Virtual Machine, Everything JIT, Native Compilation... A programming language for teaching about interpreters and programming models/paradigms ... 13 / 34 14 / 34 Declarative Expresses logic of computation without control flow: Choosing an appropriate What should be computed and not how it should be computed. Programming Language Paradigm Examples: XML/HTML, antlr4/yacc, make/ants... 16 / 34
no reviews yet
Please Login to review.