2.16 - 2.20

2.16

**Evolution of C++:**

- Bjarne Stroustrup at Bell Laboratories made the first modifications to C in 1980, adding features from Simula 67 and Smalltalk.

- These modifications included classes, derived classes, public/private access control, constructor and destructor methods, etc., resulting in "C with Classes" in 1983.

- In 1984, virtual methods, method name and operator overloading, and reference types were added, resulting in C++.

- The Cfront implementation of C++ appeared in 1985, followed by further evolutions leading to Release 2.0 in 1989 and Release 3.0 in 1990.

- Key additions included multiple inheritance, abstract classes, templates, and exception handling.


**Language Overview:**

- C++ supports both procedural and object-oriented programming, with functions and methods.

- Operators and methods can be overloaded, and dynamic binding is achieved through virtual methods.

- Templated methods and classes allow for parameterization.

- Multiple inheritance is supported, along with exception handling.


**Evaluation:**

- C++ quickly became popular due to its backward compatibility with C, good compiler availability, and suitability for large commercial projects.

- However, its complexity and inheritance of C's insecurities are drawbacks.


**Objective-C:**

- Designed by Brad Cox and Tom Love in the early 1980s, Objective-C combines imperative and object-oriented features.

- It was used in NeXT computer system software and later in MAC OS X and iPhone software.

- Features dynamic binding of messages to objects.


**Delphi:**

- Similar to C++ and Objective-C, Delphi adds object-oriented support to Pascal.

- It's considered more elegant and safer than C++ due to Pascal's characteristics.

- Provides a GUI for application development and was designed by Anders Hejlsberg, also the lead designer of C#.


**Go:**

- Developed by Rob Pike, Ken Thompson, and Robert Griesemer at Google, Go is C-based but not directly related to C++.

- It addresses the slow compilation of large C++ programs.

- Features a different syntax for data declarations, support for multiple return values, and no traditional object-oriented programming with inheritance.

2.17

This passage offers a detailed insight into the design process, features, and evaluation of Java:


**Design Process:**

- Java was designed by Sun Microsystems in 1990 to fulfill the need for a reliable programming language for embedded consumer electronic devices.

- Neither C nor C++ were deemed satisfactory due to their lack of support for object-oriented programming and concerns about reliability.

- Java was designed to be smaller, simpler, and more reliable than C++.


**Language Overview:**

- Java is based on C++ but with several modifications for simplicity and reliability.

- It supports both classes and primitive types, with arrays being instances of a predefined class.

- Java does not have pointers; instead, it uses reference types to point to class instances.

- Unlike C and C++, arithmetic expressions cannot be used for control expressions in Java.

- All Java subprograms are methods defined within classes, and Java only supports object-oriented programming.


**Evaluation:**

- Java has trimmed excess and unsafe features of C++, making it more reliable.

- Features like index range checking and concurrency enhance safety and applicability.

- Portability is achieved through the Java Virtual Machine (JVM), though initial interpretation was slower than compiled C programs.

- Java's popularity surged due to its simplicity, safety, and free availability.

- Java 7, released in 2011, introduced new features like enumeration class, generics, and a new iteration construct.

This passage provides a comprehensive understanding of Java's design principles, features, and significance in the programming landscape.


2.18

Scripting languages


**Perl:** Originally combining features of sh and awk, Perl evolved into a powerful scripting language, widely used in web programming and various applications.


**JavaScript:** Initially developed by Brendan Eich at Netscape, JavaScript became popular for client-side web programming, offering dynamic typing and support for object-oriented programming.


**PHP:** Created by Rasmus Lerdorf, PHP is a server-side scripting language designed for web applications, with features similar to JavaScript and support for HTML form processing and database management.


**Python:** Designed by Guido van Rossum, Python is an object-oriented, dynamically typed language with support for functional programming, CGI programming, and network programming.


**Ruby:** Created by Yukihiro Matsumoto, Ruby is a pure object-oriented language, similar to Smalltalk, with dynamic typing and dynamic classes, gaining cultural significance as a widely used language from Japan.


**Lua:** Designed by Roberto Ierusalimschy, Lua is a scripting language supporting procedural and functional programming, influenced by Scheme and JavaScript, with a focus on extensibility through its table data structure.

2.19 

The Flagship .NET Language: C#

C#, introduced by Microsoft in 2000 alongside the .NET platform, aims to facilitate component-based software development within the .NET Framework. It incorporates elements from C++, Java, Delphi, and Visual Basic. C# and other .NET languages share the Common Type System (CTS), enabling seamless integration of components from different languages. Unlike Java, C# code is compiled into Intermediate Language (IL) and then translated into machine code by a Just-in-Time compiler.


In terms of language features, C# diverges from Java by including some features excluded by Java, such as multiple inheritance, pointers, structs, enum types, operator overloading, and a goto statement. C# introduces improvements to certain features inherited from C++, like safer enum types and enhanced structs. It also introduces delegates, providing type-safe method references for event handling, thread control, and callbacks.


C# offers support for variable-length parameter lists through the `params` keyword and simplifies the conversion between primitive types and objects through implicit boxing and unboxing operations. Additional features include rectangular arrays, a foreach statement for iterating over arrays and collections, and properties as alternatives to public data members.


Since its release, C# has undergone continuous evolution, with the latest version being C# 2010. Recent additions include dynamic typing, implicit typing, and anonymous types. While some may argue that certain features represent a step backward, C# undoubtedly introduces constructs that advance the capabilities of programming languages, likely influencing future languages.


2.20

Markup/programming hybrid languages 

Markup/programming hybrid languages blend markup language elements with programming capabilities, enabling actions like control flow and computation within markup documents. Two notable examples are XSLT and JSP.


XSLT, or eXtensible Stylesheet Language Transformations, is used for transforming XML documents into other formats, often HTML. It employs templates to specify transformations, acting as subprograms executed when patterns match data in the XML document. Additionally, XSLT includes programming constructs like looping and sorting.


JSP, or Java Server Pages, facilitates dynamic web documents. When a JSP document is requested, the JSP processor converts it into a servlet, which is executed on the server. JSP documents contain HTML mixed with Java code. The Java code is copied into the servlet, while plain HTML is output directly. The Java Standard Tag Library (JSTL) provides XML action elements for controlling JSP document processing. Elements like `if`, `choose`, and `forEach` enable conditional logic and iteration over collections, often used for form validation and data processing.


In essence, XSLT and JSP blend the declarative nature of markup languages with the procedural capabilities of programming languages, facilitating dynamic content generation and transformation in web development.

Comments

Popular posts from this blog

SE

Synchronization