COSC 341 - Notes 01
What are Procedural Programming Languages?
-C, Pascal, Fortran, Algol (most early languages) -main features -variables, expressions, assignments -control structures, iteration -subprograms, top down design -also called imperative languages
What are the less important language evaluation criteria?
-Generality -Portability -Cost
What are Logic programming languages?
-Prolog -main features -work is performed by logic -facts, rules, knowledgebase, inference engine -use of recursion -also called declarative languages
What are Mobile Languages?
These are languages that are used to write mobile app programs. These are languages such as Java, Swift, and Objective-C
What are Script Languages?
These are languages that are used to write small programs quickly. These are languages such as Perl, Matlab, and R
What are Web Languages?
These are languages that are used to write web related programs, These are languages such as Javascript, PHP, and Ruby
What are general purpose languages?
These are languages that don't have a specific usage, and can be used to create a myriad of different programs with different purposes. These are languages such as Java, C, C++, and Python
What are Special Purpose Languages?
These are languages that were created for a very specific purpose. These are languages like Visual Basic, SQL, and Opengl.
What is language translation?
This is the process of translating a high level language to machine code.
What are Object Oriented Languages?
-Java, C++, C#(most modern languages have object oriented features) -main features -encapsulation of data and methods -classes, objects-inheritance, polymorphism -useful for large software projects
What are Functional programming languages?
-Lisp, Scheme, Haskell -main features -work is performed by function calls -uniform syntax rules -use of recursion -also called applicative languages
What are factors that decrease the Readability of a language?
-Method Overloading, Operator Overloading, Generic Types, and Inheritance Relations -extreme simplicity -machine language Java, C++, C have many factors that increase readability and some factors that decrease readability
What are the important language evaluation criteria?
-Readability -Writability -Reliability
What are factors that increase the Readability of a language?
-Simplicity -Process Abstraction (subroutines) -Data Abstraction (user defined data) -Control Structures and Block Structures Java, C++, C have many factors that increase readability and some factors that decrease readability
What are the three main methods of language translation?
-compiling -interpreting -hybrid compiling/interpreting
What is the hybrid compiling/interpreting method?
-first compiler compiles source code into intermediate code (byte code) -then interpreter interprets intermediate code -Java, Python, Javascript -These languages use BOTH compiling and interpreting method
What is compiling?
-first source program is completely translated into machine code -then machine code is executed by machine-compiling and execution occur at different times -compile once and run many times -C, C++, Fortran
Classifying languages by use:
-general purpose languages -Java, C, C++ -script languages -small programs -Perl, Matlab -web languages -web applications-Javascript, PHP -mobile languages -mobile applications -Objective C, Swift -visual languages -user interface -Visual Basic -special purpose languages -domain specific -Sql, Opengl
What is interpreting?
-interpreter decodes instructions in source program and executes them -translation and execution occur at the same time -translation occurs every time the program is run -Lisp, Basic, Perl -EX. look at every line, figure out what that line means (decode) and then do what it says (excecute)
What was the influence of hardware on language development?
-most computers are based on Von Neuman Architecture -CPU -arithmetic logic unit, control unit -memory -data, program -program and data are fetched, decoded, and executed by CPU -programming languages are designed to work with this architecture -future architectures may produce new types of languages -COMPUTER HARDWARE'S INFLUENCE HAS MADE IT SO THAT THERE ARE FEWER LANGUAGES
What are the major language categories?
-procedural programming languages -object oriented programming languages -functional programming languages -logic programming languages
What is the Cost of a language?
-programmer training -simple language costs less for programmer training -software development -writable language decreases software development cost -reliability cost -reliable language costs less in software failures -maintenance cost -readable language costs less in software updates -cost of compiler/debugger -freely available language costs less
What was the influence of programming methodologies on language development?
-programming methodologies change with time and languages change with them: -50's 60's -basic operations, sequence of statements -assembly language, early Fortran -70's -decomposition into subprograms, procedural programming -Algol, Pascal, Fortran, C -80's -data becomes important, user defined data types and operations on them -C++ -90's -object oriented programming, encapsulation of data and operations, large scale software development -Java -2000's 2010's -web programming, mobile applications -Javascript, PHP, Swift -THIS INCREASES THE AMOUNT OF LANGUAGES THERE ARE
What is an IDE?
-provides all components of programming -editor, compiler, debugger, libraries, other tools -BlueJ, Eclipse, Visual Studio, Xcode
What are factors that increase the Writability of a language?
-simplicity (small number of language features) -process abstraction (subprograms) -data abstraction (user defined data) -control structures and block structures -expressivity (ability to express ideas) -inheritance, generics, exception handling, recursion
What are factors that decrease the Writability of a language?
-too much expressivity such as inheritance, generics, exception -extreme simplicity such as having no loops as in machine language 3
What factors influenced language development?
-two main factors influenced the development of languages -computer hardware -programming methodologies
What are factors that increase the Reliability of a language?
-type checking increases reliability (check type mismatches at compile time, prevent type conversions) -exception handling increases reliability -catch run time errors and continue running -Java performs good type checking, Java/C++ handle exceptions -readability increases reliability -easier to find errors in an easily readable language -writability increases reliability -less likely to make errors in an easily writable language
What is the Generality of a language?
Can the language be used to write many types of programs -Java, C++, C, Python are general purpose languages-used to write various software -science, engineering, business, graphics, networks, database
What is the Portability of a language?
Can the language be used to write programs that are machine independent -portable language is better -write program once and run anywhere -Java is portable, C/C++ are not portable