Lecture 1 CS 354 Programming Languages

What is a natural language? (1)
A natural language is any language which occurs naturally in a human community.

What is a formal language? (1)
A formal language is a language consisting of words whose letters are taken from an alphabet and are formed according to a set of rules.

What is the set of rules for a formal language called? (1)
The set of rules for a formal language is called a formal grammar.

Are programming languages natural languages or formal languages?
Programming languages are formal languages.

Why study programming languages (PLs)?

Is knowing multiple programming languages a good thing?
Yes, knowing multiple programming languages is a good thing.

In what ways are programming languages different from one another?
The ways that programming languages are different from one another include:

  • Their features.
  • Their paradigms.
  • What tasks they're good at.

What should you know about the design of a programming language?
For the design of a programming language, you should know the theory behind it.

Summary

It's good to know multiple programming languages because they're different from one another in their features, paradigms, and what tasks they're good at. By knowing a language, you should also understand the theory behind its design.

There are different "levels" of PL

What are five basic levels of abstraction when it comes to programming languages?
When it comes to programming languages, the five basic levels of abstraction are:

  1. Microcode languages.
  2. Machine languages.
  3. Assembly languages.
  4. Intermediate / internal languages.
  5. High-level languages.

What makes Java an intermediate language?
What makes Java an intermediate language is that it compiles to a bytecode that's lower level than source code but higher level than actual machine code.

Why are there so many PLs?

What are twelve different reasons why there are many different programming languages?
Twelve different reasons why there are many different programming languages are:

  1. We've learned better ways of doing things over time.
  2. Socio-economic factors - Proprietary interests and commercial advantages.
  3. Special purposes.
  4. Special hardware.
  5. We have diverse ideas about what is pleasant to use.
  6. Some are easier to learn.
  7. Some are easier to implement a translator for.
  8. Some enforce programmer behaviors that reduce program maintenance costs.
  9. Translation technology has improved.
  10. Some programming languages match problem domains.
  11. Expressive power is important even if computability power is equal.
  12. Some programming languages have a huge base of previously written programs and libraries.

What makes a PL successful?

What are six reasons why some programming languages are more successful than others?
Six reasons why some programming languages are more successful than others are:

  1. Some are easier to learn - BASIC, Pascal, LOGO, and Scheme.
  2. Some are easier to use, more expressive, and more powerful once fluent - C, Common Lisp, APL, Algol-68, and Perl.
  3. Some are easier to implement - Pascal, BASIC, and Forth.
  4. Some are easier to compile to very good, fast, and/or small code - Fortran.
  5. Some have the backing of a powerful sponsor - COBOL, PL/I, Ada, and Visual Basic.
  6. Some have enjoyed wide dissemination at minimal cost - Pascal, Turing, and Java.

Why do we have PLs? What is a PL for?

What three things does a programming language help to determine?
Three things that a programming language helps to determine include:

  1. The way you think.
  2. The way you express algorithms.
  3. The way you solve problems.

What two points of view do some programming languages try to match?
The two points of view that some programming languages try to match include:

  1. The user's.
  2. The developer's.

What two things can a programming language be an abstraction of?
Two things a programming language can be an abstraction of are:

  1. A machine.
  2. A virtual machine.

What do programming languages allow you to do?
Programming languages allow you to specify what you want the hardware to do without getting down into the bits.

Why study PLs?

...