A Look at Hello World
Objectives
We would like to :
- Understand some basic terms that apply to programming languages.
- Understand resources available for learning about a programming language.
Notes
- These notes are from
- About information sources:
- I think the book is good for
- Learning how to program in general.
- Learning the terms associated with programming
- Learning a specific language, but only what the author wants to share..
- But references
- Provide a full specification of the language.
- For today, I will be using javapoint.com, but that might change.
- You need to learn both.
- Some terms
- We discuss two terms associated with languages
- syntax or the rules that form the language
- semantics or what the language elements mean.
- Syntax in programming languages is usually straight forward
- And if you break the rules, the compiler will tell you.
- These are called syntax errors
- As opposed to English, or any other human language, the semantics of a programming language are unambiguous.
- There is only one single meaning for any expression in any situation.
- To program you need to understand the syntax and the semantics.
- To program efficiently, you need to have these memorized.
- That will come with practice.
- In the mean time, just follow the example.
- And ask questions if you do not understand some portion.
- Finally there is style.
- This how you write.
- Given the above definitions, you might not think there is much latitude, for style.
- But there is.
- I will explain style as we go along.
- Again, you should copy this until you understand better.
- Think about how you learned to speak/write/use your native language
- You copied those around you.
- Someone corrected you ("don't use ain't")
- Then you formalized it in class.
- But you continue to learn and correct as you read and interact with others.