A Look at the Design Of

Total Page:16

File Type:pdf, Size:1020Kb

A Look at the Design Of contributed articles DOI:10.1145/3186277 build a new abstraction. Encapsu- Simplicity, small size, portability, lation in the C language provides a good example of a policy. The ISO C and embeddability set Lua apart specification offers no mechanism from other scripting languages. for modules or interfaces.9 Neverthe- less, C programmers leverage existing BY ROBERTO IERUSALIMSCHY, LUIZ HENRIQUE DE FIGUEIREDO, mechanisms (such as file inclusion AND WALDEMAR CELES and external declarations) to achieve those abstractions. On top of such ba- sic mechanisms provided by the C lan- guage, policy adds several rules (such as “all global functions should have a A Look at prototype in a header file” and “header files should not define objects, only de- clare them”). Many programmers do not know these rules (and the policy as a whole) are not part of the C language. the Design Accordingly, in the design of Lua, we have replaced addition of many different features by creating instead only a few mechanisms that allow of Lua programmers to implement such fea- tures themselves.6 The motto leads to a design that is economical in con- cepts. Lua offers exactly one general mechanism for each major aspect of programming: tables for data; func- tions for abstraction; and coroutines LUA IS A scripting language developed at the Pontifical for control. On top of these building Catholic University of Rio de Janeiro (PUC-Rio) that blocks, programmers implement sev- eral other features, including modules, has come to be the leading scripting language for objects, and environments, with the video games worldwide.3,7 It is also used extensively in aid of minimal additions (such as syn- tactic sugar) to the language. Here, we embedded devices like set-top boxes and TVs and in look at how this motto has worked out other applications like Adobe Photoshop Lightroom in the design of Lua. and Wikipedia.14 Its first version was released in 1993. Design Goals The current version, Lua 5.3, was released in 2015. Like other scripting languages, Lua Though mainly a procedural language, Lua lends has dynamic types, dynamic data struc- itself to several other paradigms, including object- tures, garbage collection, and an eval- like functionality. Consider Lua’s par- oriented programming, functional programming, and ticular set of goals: data-driven programming.5 It also offers good support for data description, in the style of JavaScript and key insights ˽ What sets Lua apart from other scripting JSON. Data description was indeed one of our main languages is its particular set of goals: motivations for creating Lua, some years before the simplicity, small size, portability, and embeddability. appearance of XML and JavaScript. ˽ The entire implementation of Lua has Our motto in the design of Lua has always been 25,000 lines of C code; the binary for 64-bit Linux has 200k bytes. “mechanisms instead of policies.” By policy, we mean ˽ Since its inception, Lua was designed a methodical way of using existing mechanisms to to interoperate with other languages. BUG FISH BY IMAGE 114 COMMUNICATIONS OF THE ACM | NOVEMBER 2018 | VOL. 61 | NO. 11 NOVEMBER 2018 | VOL. 61 | NO. 11 | COMMUNICATIONS OF THE ACM 115 contributed articles Simplicity. Lua aims to offer only a access global variables in a state, and of embeddability in the design of Lua, few powerful mechanisms that can ad- perform other basic tasks. The stand- we first briefly introduce the interface dress several different needs, instead alone Lua interpreter is a tiny applica- between Lua and its host language. of myriad specific language constructs, tion written on top of the library. each tailored for a specific need. The These goals have had a deep impact The Lua–C API Lua reference manual is small, with on our design of Lua. Portability re- To illustrate the concept of embedding approximately 100 pages covering the stricts what the standard libraries can in Lua, consider a simple example of a language, its standard libraries, and offer to what is available in ISO C, in- C program using the Lua library. Take the API with C; cluding date and time, file and string this tiny Lua script, stored in a file Small size. The entire implementa- manipulation, and basic mathemati- tion of Lua consists of 25,000 lines of cal functions. Everything else must be pi = 4 * math.atan(1) C code; the binary for 64-bit Linux has provided by external libraries. Simplic- 200k bytes. Being small is important ity and small size restrict the language Figure 1 shows a C program that runs for both portability, as Lua must fit into as a whole. These are the goals behind the script and prints the value of pi. a system before running there, and em- the economy of concepts for the lan- The first task is to create a new state bedding, as it should not bloat the host guage. Embeddability has a subtler and populate it with the functions from application that embeds it; influence. To improve embeddability, the standard libraries (such as math. Portability. Lua is implemented in Lua favors mechanisms that can be atan). The program then calls luaL _ ISO C and runs in virtually any system represented naturally in the Lua-C API. loadfile to load (precompile) the with as little as 300k bytes of memory. For instance, Lua tries to avoid or re- given source file into this state. In the Lua runs in all mainstream systems duce the use of special syntax for a new absence of errors, this call produces a and also on mainframes, inside OS ker- mechanism, as syntax is not accessible Lua function that is then executed by nels (such as the NetBSD kernel), and through an API. On the other hand, lua _ pcall. If either loadfile or on “bare metal” (such as NodeMCU mechanisms exposed as functions are pcall raises an error, it produces an running on the ESP8266 microcon- naturally mapped to the API. error message that is printed to the troller); and Following the motto “mechanisms terminal. Otherwise, the program gets Embeddability. Lua was designed instead of policies” has a clear impact on the value of the global variable pi and since its inception to interoperate with simplicity and small size. It also affects prints its value. other languages, both by extending— embeddability by breaking complex The data exchange among these API allowing Lua code to call functions concepts into simpler ones that are calls is done through an implicit stack written in a foreign language—and by easier to represent in the API. in the Lua state. The call to luaL _ embedding—allowing foreign code to Lua supports eight data types: nil, loadfile pushes on the stack either call functions written in Lua.8 Lua is boolean, number, string, userdata, a function or an error message. The thus implemented not as a standalone table, function, and thread, which rep- call to lua _ pcall pops the func- program but as a library with a C API. resents coroutines. The first five are tion from the stack and calls it. The This library exports functions that cre- no surprise. The last three give Lua call to lua _ getglobal pushes the ate a new Lua state, load code into a its flavor and are the ones we discuss value of the global variable. The call to state, call functions loaded into a state, here. However, given the importance lua _ tonumber projects the Lua val- ue on top of the stack to a double. The Figure 1. A C program using the Lua library. stack ensures these values remain vis- ible to Lua while being manipulated by #include <stdio.h> #include “lauxlib.h” the C code so they cannot be collected #include “lualib.h” by Lua’s garbage collector. Besides the functions used in this int main (int argc, char **argv) { simple example, the Lua–C API (or “C // create a new state lua_State *L = luaL_newstate(); API” for short) offers functions for all // load the standard libraries kinds of manipulation of Lua values, luaL_openlibs(L); including pushing C values (such as // try to load the given file and then // call the resulting function numbers and strings) onto the stack, if (luaL_loadfile(L, argv[1]) != LUA_OK || calling functions defined by the script, lua_pcall(L, 0, 0, 0) != LUA_OK) { and setting variables in the state. // some error occurred; print the error message fprintf(stderr, “lua: %s\n”, lua_tostring(L, -1)); } Tables else { // code ran successfully “Table” is the Lua term for associa- lua_getglobal(L, “pi”); tive arrays, or “maps.” A table is just printf(“pi: %f\n”, lua_tonumber(L, -1)); a collection of entries, which are pairs } lua_close(L); // close the state 〈key, value〉. return 0; Tables are the sole data-structuring } mechanism in Lua. Nowadays, maps are available in most scripting 116 COMMUNICATIONS OF THE ACM | NOVEMBER 2018 | VOL. 61 | NO. 11 contributed articles languages, as well as in several non- An interesting property of this im- scripting ones, but in Lua maps are plementation is that it gives sparse ubiquitous. Indeed, Lua programmers arrays for free. For instance, when a use tables not only for all kinds of data programmer creates a table with three structures (such as records, arrays, entries at indices 5, 100, and 3421, Lua lists, sets, and sparse matrices) but Lua offers exactly automatically stores them in the hash also for higher-level constructs (such as one general part, instead of creating a large array modules, objects, and environments). with thousands of empty slots. Programmers implement records mechanism for Lua also uses tables to implement using tables whose indices are strings each major aspect weak references.
Recommended publications
  • Differential Fuzzing the Webassembly
    Master’s Programme in Security and Cloud Computing Differential Fuzzing the WebAssembly Master’s Thesis Gilang Mentari Hamidy MASTER’S THESIS Aalto University - EURECOM MASTER’STHESIS 2020 Differential Fuzzing the WebAssembly Fuzzing Différentiel le WebAssembly Gilang Mentari Hamidy This thesis is a public document and does not contain any confidential information. Cette thèse est un document public et ne contient aucun information confidentielle. Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Technology. Antibes, 27 July 2020 Supervisor: Prof. Davide Balzarotti, EURECOM Co-Supervisor: Prof. Jan-Erik Ekberg, Aalto University Copyright © 2020 Gilang Mentari Hamidy Aalto University - School of Science EURECOM Master’s Programme in Security and Cloud Computing Abstract Author Gilang Mentari Hamidy Title Differential Fuzzing the WebAssembly School School of Science Degree programme Master of Science Major Security and Cloud Computing (SECCLO) Code SCI3084 Supervisor Prof. Davide Balzarotti, EURECOM Prof. Jan-Erik Ekberg, Aalto University Level Master’s thesis Date 27 July 2020 Pages 133 Language English Abstract WebAssembly, colloquially known as Wasm, is a specification for an intermediate representation that is suitable for the web environment, particularly in the client-side. It provides a machine abstraction and hardware-agnostic instruction sets, where a high-level programming language can target the compilation to the Wasm instead of specific hardware architecture. The JavaScript engine implements the Wasm specification and recompiles the Wasm instruction to the target machine instruction where the program is executed. Technically, Wasm is similar to a popular virtual machine bytecode, such as Java Virtual Machine (JVM) or Microsoft Intermediate Language (MSIL).
    [Show full text]
  • WHO Guidance on Management of Snakebites
    GUIDELINES FOR THE MANAGEMENT OF SNAKEBITES 2nd Edition GUIDELINES FOR THE MANAGEMENT OF SNAKEBITES 2nd Edition 1. 2. 3. 4. ISBN 978-92-9022- © World Health Organization 2016 2nd Edition All rights reserved. Requests for publications, or for permission to reproduce or translate WHO publications, whether for sale or for noncommercial distribution, can be obtained from Publishing and Sales, World Health Organization, Regional Office for South-East Asia, Indraprastha Estate, Mahatma Gandhi Marg, New Delhi-110 002, India (fax: +91-11-23370197; e-mail: publications@ searo.who.int). The designations employed and the presentation of the material in this publication do not imply the expression of any opinion whatsoever on the part of the World Health Organization concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Dotted lines on maps represent approximate border lines for which there may not yet be full agreement. The mention of specific companies or of certain manufacturers’ products does not imply that they are endorsed or recommended by the World Health Organization in preference to others of a similar nature that are not mentioned. Errors and omissions excepted, the names of proprietary products are distinguished by initial capital letters. All reasonable precautions have been taken by the World Health Organization to verify the information contained in this publication. However, the published material is being distributed without warranty of any kind, either expressed or implied. The responsibility for the interpretation and use of the material lies with the reader. In no event shall the World Health Organization be liable for damages arising from its use.
    [Show full text]
  • Php Tutorial
    PHP About the Tutorial The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web-based software applications. This tutorial will help you understand the basics of PHP and how to put it in practice. Audience This tutorial has been designed to meet the requirements of all those readers who are keen to learn the basics of PHP. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of computer programming, Internet, Database, and MySQL. Copyright & Disclaimer © Copyright 2016 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] i PHP Table of Contents About the Tutorial ...........................................................................................................................................
    [Show full text]
  • Eclipse (Software) 1 Eclipse (Software)
    Eclipse (software) 1 Eclipse (software) Eclipse Screenshot of Eclipse 3.6 Developer(s) Free and open source software community Stable release 3.6.2 Helios / 25 February 2011 Preview release 3.7M6 / 10 March 2011 Development status Active Written in Java Operating system Cross-platform: Linux, Mac OS X, Solaris, Windows Platform Java SE, Standard Widget Toolkit Available in Multilingual Type Software development License Eclipse Public License Website [1] Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java and can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Perl, PHP, Python, Ruby (including Ruby on Rails framework), Scala, Clojure, and Scheme. The IDE is often called Eclipse ADT for Ada, Eclipse CDT for C/C++, Eclipse JDT for Java, and Eclipse PDT for PHP. The initial codebase originated from VisualAge.[2] In its default form it is meant for Java developers, consisting of the Java Development Tools (JDT). Users can extend its abilities by installing plug-ins written for the Eclipse software framework, such as development toolkits for other programming languages, and can write and contribute their own plug-in modules. Released under the terms of the Eclipse Public License, Eclipse is free and open source software. It was one of the first IDEs to run under GNU Classpath and it runs without issues under IcedTea. Eclipse (software) 2 Architecture Eclipse employs plug-ins in order to provide all of its functionality on top of (and including) the runtime system, in contrast to some other applications where functionality is typically hard coded.
    [Show full text]
  • G S Getting Started with Opensees
    GSGetting Started with OpenSees Vesna Terzic UC Berkeley September 2011 Agenda • ItIntrod ucti on t o O penS ees • Introduction to Tcl programming language • Demonstration of how to download OpenSees interpreter and install Tcl/Tk • Discuss ion of Open Sees Resources (comman d manual, getting started manual, examples manual, message board) • Example of how to create and run a small structure • Q&A with web participants What is OpenSees? • A software framework (written primarelly in C++) for simulation applications in earthquake engineering using finite element methods . • It is open-source software framework • AitihifhidA communication mechanism for exchanging and building upon research accomplishments • OpenSees is fast , stable , efficient in solving large nonlinear models with multiple runs • To make FEM in OpenSees you need to know basics of Tcl programing language OpenSees Framework How Do People Use the OpenSees Framework? • Provide their own main() function in C++ and link to framework. • Use OpenSees interpreters (OpenSees.exe, OSSPOSMP)ThOpenSeesSP.exe, OpenSeesMP.exe). These are extensions of the Tcl interpreters (tclsh, wish) which have been extended to commands for finite element analysis: 1. Modeling – create nodes, elements, loads and constraints 2. Analysis – specify the analysis procedure. 3. Output specification – specify what it is you want to monitor during the analysis. Being interpreters means that the files you create and submit to the OpenSees interpreters are not input files. You are creating and submitting PROGRAMS. What is Tcl? • Tcl is a dynamic programming language. • It is a string based command language . • Variables and variable substitution • Expression evaluation • Basic control structures (if , while , for , foreach) • Procedures • File manipulation • Sourcing other files .
    [Show full text]
  • Comparing Common Programming Languages to Parse Big XML File in Terms of Executing Time, Memory Usage, CPU Consumption and Line Number on Two Platforms
    European Scientific Journal September 2016 edition vol.12, No.27 ISSN: 1857 – 7881 (Print) e - ISSN 1857- 7431 Comparing Common Programming Languages to Parse Big XML File in Terms of Executing Time, Memory Usage, CPU Consumption and Line Number on Two Platforms Ahmed Mahdee Abdo Sardar Hasan Alali Computer Science department, Zakho University, Kurdistan, Iraq doi: 10.19044/esj.2016.v12n27p325 URL:http://dx.doi.org/10.19044/esj.2016.v12n27p325 Abstract XML files are used widely to save the information especially in the field of bioinformatics about the whole genome. There are many programming languages and modules used to parse XML files in different platforms such as Linux, Macintosh and Windows. The aim of this report is to reveal and determine which common programming language to use and on which platform is better to parse XML files in terms of memory usage, CPU time consumption and executing time. Keywords: XML, memory usage, CPU consumption and executing time. Introduction As many kinds of methods such as next generation technologies are used to sequence the whole genome, enormous amount of date became available. These dates are usually saved as text files. Extensible Markup Language (XML) files are kind of text files which are used to save much information about the whole genome.XML is a flexible text-based language that was developed by Standard Generalized Markup Language (SGML) to represent the information on the web server. XML is a document that represents the data as a structure which involves tags or entities and elements that are subset of these entities. Each element contains one or more attributes that define the method to process these elements.
    [Show full text]
  • The Python Programming Language and Its Capabilities in the Gis Environment
    THE PYTHON PROGRAMMING LANGUAGE AND ITS CAPABILITIES IN THE GIS ENVIRONMENT Katarzyna Szczepankowska mgr inż. Department of Real Estate Management and Regional Development University of Warmia and Mazury in Olsztyn Olsztyn, Poland e-mail: [email protected] Krzysztof Pawliczuk mgr inż. The Office of Student Systems Services University of Warmia and Mazury in Olsztyn Olsztyn, Poland e-mail: [email protected] Sabina Źróbek Department of Real Estate Management and Regional Development University of Warmia and Mazury in Olsztyn Olsztyn, Poland e-mail: [email protected] Abstract The first chapter of this paper reviews the most popular programming languages, including Java, PHP, Python, C# and C++, and describes their characteristic features. Chapter discusses the capabilities, technical features and advantages of Python which is quickly taking the lead as one of the most popular programming languages in the world. The authors emphasize Python's key strengths, including high efficiency, easy implementation of new functions, code readability, easy upgrade and its open source nature. The third chapter presents Python scripting options in the GIS environment and its popularity with major technology developers, among them Google, YouTube, Nokia and NASA. The last chapter discusses the rapid increase in Python's popularity and discusses its most recent applications, including in ESRI software and computer games. The extensive capabilities of Python make it suitable for developing various types of interactive maps. Key words: Programming language, Python, GIS, interactive map. 1. History of programming languages The history of computing machines dates back to the 20th century, but the breakthrough event in digital electronics was the invention of the transistor, the key component of various electronic systems.
    [Show full text]
  • 7 Reasons the Future of Tcl Is Bright by Clif Flynt ([email protected]) 7 Reasons the Future of Tcl Is Bright
    7 REASONS THE FUTURE OF TCL IS BRIGHT BY CLIF FLYNT ([email protected]) 7 REASONS THE FUTURE OF TCL IS BRIGHT The future is bright for Tcl! You’d be pardoned for his repertoire. He started shell programming in 1985, thinking otherwise. It’s not a sexy new language. In fact, picked up Perl in 1995 and finally Tcl in 1996. He’s been a it’s ranked outside the Top 50 in the TIOBE Index1. Tcl devotee ever since. But for the right projects - and there are lots of them - it’s With Clif’s extensive background, we asked him about a powerful tool that’s been stress-tested for many years the future of Tcl. Here’s seven reasons why the future and just gets the job done. of Tcl is bright. Tcl is not resting on its laurels. The simplicity of the Tcl language makes it perfect for Internet of Things IoT and 1: TCL IS STILL THE KING OF electronics design, including Electronic Design Automa- RAPID PROTOTYPING tion (EDA), chip design, and Field-Programmable Gate Clif is a big fan of Tcl for rapid prototypes that actually Array (FPGA) development, and for configuring chips after work. NBC Broadcasting studios uses Tcl/Tk to control manufacture. The same features that make Tcl dominant what you see. They went to GE Research (and others) in EDA and FPGA also make it great for DevOps, poten- with a half-baked design and some examples of the tially competing with Bash and Perl as the language of clipboards and tapes they were using.
    [Show full text]
  • Programming Language Use in US Academia and Industry
    Informatics in Education, 2015, Vol. 14, No. 2, 143–160 143 © 2015 Vilnius University DOI: 10.15388/infedu.2015.09 Programming Language Use in US Academia and Industry Latifa BEN ARFA RABAI1, Barry COHEN2, Ali MILI2 1 Institut Superieur de Gestion, Bardo, 2000, Tunisia 2 CCS, NJIT, Newark NJ 07102-1982 USA e-mail: [email protected], [email protected], [email protected] Received: July 2014 Abstract. In the same way that natural languages influence and shape the way we think, program- ming languages have a profound impact on the way a programmer analyzes a problem and formu- lates its solution in the form of a program. To the extent that a first programming course is likely to determine the student’s approach to program design, program analysis, and programming meth- odology, the choice of the programming language used in the first programming course is likely to be very important. In this paper, we report on a recent survey we conducted on programming language use in US academic institutions, and discuss the significance of our data by comparison with programming language use in industry. Keywords: programming language use, academic institution, academic trends, programming lan- guage evolution, programming language adoption. 1. Introduction: Programming Language Adoption The process by which organizations and individuals adopt technology trends is complex, as it involves many diverse factors; it is also paradoxical and counter-intuitive, hence difficult to model (Clements, 2006; Warren, 2006; John C, 2006; Leo and Rabkin, 2013; Geoffrey, 2002; Geoffrey, 2002a; Yi, Li and Mili, 2007; Stephen, 2006). This general observation applies to programming languages in particular, where many carefully de- signed languages that have superior technical attributes fail to be widely adopted, while languages that start with modest ambitions and limited scope go on to be widely used in industry and in academia.
    [Show full text]
  • What Are the Reasons to Choose Laravel MVC for Web Development?
    What are the reasons to choose Laravel MVC for web development? Sambhav Rajput MSC IT – Research Methods and Professional Issues Bournemouth University Poole, United Kingdom [email protected] Abstract— In the current market, there is a wide range of business logic (models), the manipulate coordination interesting technological solutions. So, it is recommended to (controllers) and the presentation of statistics (views) into 3 properly research, identify and implement the solution distinctive layers. In other phrases, the heart of the MVC which most suited to the information system strategy. In pattern is the concept of “Separation of concern” [4]. The contemporary years due to the brisk development of internet framework additionally helps modular architect which technology, online business is gradually rampant. Website enables developers to separate code into unbiased users are very demanding as all the time they expect the web manageable modules [5]. Laravel is one of the PHP systems services to be quickly and easily accessible from different that have distinctive aspects e.g., expressiveness and clean code [6]. places around the world, whenever they need it. Website users always need very rapid and quick responses. Website In this context, this paper focuses on below hypothesis development is a process that takes time and takes more questions: time if the development language is simple, which is not What is MVC Really? consistent with this quick and evolving world of technology. So that's why frameworks are developed to overcome these What is Laravel Authentication? problems related to web development and to create websites What is Laravel Middleware? very conveniently.
    [Show full text]
  • Build Web Services with PHP in Eclipse Using PHP Development Tools for Contract-First Development
    Build Web services with PHP in Eclipse Using PHP development tools for contract-first development Skill Level: Intermediate Nathan A. Good ([email protected]) Senior Information Engineer Consultant 13 May 2008 Learn how to build Web services in PHP using the PHP Development Tools plug-in in Eclipse Europa. Become familiar with the PDT project, and learn how to create and deploy useful PHP projects, learn about the philosophy behind contract-first development, and understand the basic parts that make up a Web Services Description Language (WSDL) file. Section 1. Before you start About this tutorial This tutorial shows how to build Web services in PHP using the PHP Development Tools (PDT) plug-in. The PDT project was unveiled in September 2007 and was followed by V1.0.2 in January 2008. The PDT project provides first-class abilities to edit, debug, and deploy PHP applications in the Eclipse IDE. Objectives This tutorial has three main objectives. The first is to become familiar with the PDT project, and learn how to create and deploy useful PHP projects. The second is to learn about the philosophy behind contract-first development. Third, this tutorial Build Web services with PHP in Eclipse © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 26 developerWorks® ibm.com/developerWorks serves as an informative overview of the basic parts that make up a WSDL file. Prerequisites You should have experience with PHP development. System requirements To get the most out of this tutorial, you need to install Eclipse Europa and the PDT plug-in. You must also install the Eclipse Web Standard Tools (WST) subproject.
    [Show full text]
  • CS240: Programming in C
    CS240: Programming in C Lecture 1: Class overview. Cristina Nita-Rotaru Lecture 1/ Fall 2013 1 Why learn C (1) ! C is one of the foundations for CS: " Contains/applies principles from programming languages, computer architectures, operating systems, network communication, database, graphical user interface (GUI), graphics, image processing, parallel processing, multi-threads, real-time systems, device drivers, data acquisition, algorithms, numerical analysis, and computer game. Cristina Nita-Rotaru Lecture 1/ Fall 2013 4 What does this buy you? ! Understanding: understand better the interaction between machine and software: " “…teaches individuals how computers really work” " “…built a foundation you’ll be thankful for every 300+ level course ” Cristina Nita-Rotaru Lecture 1/ Fall 2013 5 Why learn C (2) ! C is the most commonly used programming language in industry. " Next two popular are Java and C++ " Language of systems programming: low-level control over the OS, networking, crypto operations, email, games, embedded systems have higher performance when written in C http://www.langpop.com Cristina Nita-Rotaru Lecture 1/ Fall 2013 6 What does this buy you? ! Helps you be as prepared as possible for a job: " Most of the employers want candidates to know multiple languages " Will prepare you better for a job interview " Gives you more opportunities within a company Cristina Nita-Rotaru Lecture 1/ Fall 2013 7 Why learn C (3) ! C is the base for almost all popular programming languages. ! Because of the performance and portability of C, almost all popular cross-platform programming languages and scripting languages, such as C++, Java, Python, Objective-C, Perl, Ruby, PHP, Lua, and Bash, are implemented in C and borrowed syntaxes and functions heavily from C.
    [Show full text]