CS2403 Programming Languages Course Outline Chung-Ta King Department of Computer Science National Tsing Hua University (Slides are adopted from Concepts of Programming Languages, R.W. Sebesta; Modern Programming Languages: A Practical Introduction, A.B. Webber)
19
Embed
CS2403 Programming Languages Course Outline Chung-Ta King Department of Computer Science National Tsing Hua University (Slides are adopted from Concepts.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CS2403 Programming Languages
Course Outline
Chung-Ta KingDepartment of Computer ScienceNational Tsing Hua University(Slides are adopted from Concepts of Programming Languages, R.W. Sebesta; Modern Programming Languages: A Practical Introduction, A.B. Webber)
2
On Valentine’s Day
You want to impress your girl friend by baking a chocolate cake specifically for her.
processors (oven, mixer) process inputs to generate output
Can be expressed in different languages
Program: You tell a computer
how to do a computation
Has inputs and outputs
Define a procedure (algorithm)
Instruct how processors process inputs to generate outputs
Can be expressed in different languages
7
Questions
Given two languages, how do they differ in expressing the same receipt/algorithm?
Which language is better? How to evaluate “goodness” of languages?
Why are there so many different languages? What is “programming language” anyway? Why does a programming language have so
many different features? How are these features implemented? … Topics of
this course
8
A Programming Language Is …
An artificial language designed to express computations or algorithms that can be performed by a computer -- WikipediaA language is a means of expressing your
thoughts to othersIn the case of PL, it is a means of expressing
your thoughts (algorithms) to a computerNatural languages such as Chinese and English
are not used because they cannot be easily translated into machine language executable by the computer
Keywords: expressiveness, implementation
9
Why PL Important?
A language is a framework for problem-solvingIt may facilitate or hinder your thoughts and,
thus, the abilities to solve problemsIt may help you make fewer mistakes
Example: tense and gender, e.g.“He was doing great!” in English
Example: a C language that supports only static and global variables no malloc()How to implement hash table? linked list?
(Ref.: John Mitchell, http://www.stanford.edu/class/cs242)
How to choose
PL?
10
Important to Know PL by Trend
(TIOBE Programming Community)
11
TIOBE
12
Important to Know PL by Trend
Increasing use of type-safe languages: Java, C#, …
Scripting languages for web applications with increasing client-side functionality
More on expressing algorithms than syntax
Runtime environment and virtualization with continuous compilation, analysis, and checking
More program analysis abilities: automated error detection and recovery
(Ref.: John Mitchell, http://www.stanford.edu/class/cs242)
13
Important to Know PL by Tradeoffs
Factors influencing programming language Expressiveness:
Concepts of Programming Languages, Robert W. Sebesta, 9th Edition, Addison Wesley, 2009Describing Syntax and SemanticsNames, Bindings, and ScopesData TypesExpressions and AssignmentControl StructuresSubprogramsAbstract Data Types, EncapsulationConcurrencyException Handling and Event HandlingFunctional and Logic Programming Languages
18
Expected Workload
Assignments:Expect one assignment every two weeks,