Uploads Seng206 Week1
Uploads Seng206 Week1
(SENG206)
@yenalarslan1
https://www.linkedin.com/in/yenalarslan
[email protected]
Textbook
• Robert W. Sebesta,
“Concepts of Programming Languages”, Pearson, 12th Edition
BASIC was developed to provide students with a simpler way to program computers. At the time, programming was
predominantly done in languages like FORTRAN or in assembly language, which were not considered accessible to beginners
or those outside the scientific and engineering communities.
BASIC was designed to be easy to learn and use, making computer programming more accessible to a wider audience. It was
interactive, allowing for immediate feedback, which was a departure from the batch processing mode common at the time.
It became widely popular, especially with the advent of microcomputers in the 1970s and 1980s. Many early personal
computers shipped with BASIC as a built-in programming environment, significantly contributing to its spread among
hobbyists, students, and beginners.
BASIC's simplicity and ease of use helped demystify computer programming, sparking interest and fostering a generation of
programmers.
Evolution:
Over the years, BASIC evolved significantly, with many dialects and versions developed to suit different platforms and needs,
including Microsoft's Visual Basic, which added object-oriented features and a graphical user interface for program
development.
Pascal
Pascal was designed to promote programming as a systematic discipline based on a formal methodology. It was intended to
counteract the complexities and pitfalls of programming in assembly or other high-level languages of the time.
The language enforced a clear structure to programs, requiring the declaration of variables before use, and it used a block
structure for organizing code. These features made programs easier to read, understand, and maintain.
Pascal became widely used in education, especially in introductory programming courses, due to its simplicity and
effectiveness in teaching fundamental programming concepts.
Evolution:
Pascal's influence extended beyond education. It was used for commercial software development, including the early
versions of the Apple operating system and various application software.
The language also served as the basis for several other languages and systems. Notably, Borland's Turbo Pascal, introduced
in the 1980s, provided an integrated development environment (IDE) and was highly popular for PC software development.
Additionally, Pascal influenced the development of Delphi, an object-oriented version of Pascal introduced by Borland in the
mid-1990s, and it laid the groundwork for other programming languages, including Modula-2 and Oberon, also developed
by Niklaus Wirth.
Delphi is a software development environment that includes a powerful programming language, initially based on Pascal. It
was introduced by Borland in 1995 and has undergone significant evolution and ownership changes over the years. Delphi's
history is marked by its focus on rapid application development (RAD), visual design, and component-based software
development.
Delphi was launched by Borland in 1995 as a RAD tool for Windows applications. It built upon the foundation of Borland's
earlier Turbo Pascal product, enhancing it with a visual Integrated Development Environment (IDE) and a stronger focus on
object-oriented programming.
The name "Delphi" was chosen in reference to the Oracle of Delphi, playing on the notion of "oracle" to signify the
product's ability to predict the future of software development. It was a direct competitor to Microsoft's Visual Basic.
Features: From the start, Delphi was praised for its fast compilation speed, robust framework (VCL - Visual Component
Library), and its ability to develop both desktop and database applications efficiently.
Ownership Changes
CodeGear: In 2006, Borland transferred its developer tools division, including Delphi, to a wholly-owned subsidiary called
CodeGear.
Embarcadero Technologies: In 2008, CodeGear was acquired by Embarcadero Technologies, which continued the
development of Delphi, focusing on modernizing the IDE, enhancing cross-platform capabilities, and expanding the
language to support modern programming paradigms.
Idera, Inc.: Embarcadero was later acquired by Idera, Inc. in 2015, which has continued to invest in Delphi, maintaining its
relevance in the modern software development landscape.
The TIOBE
Programming
Community index
is an indicator of
the popularity of
programming
languages
https://www.tiob
e.com/tiobe-
index/
The C programming language, developed in the early 1970s by Dennis Ritchie for the Unix operating system at Bell Labs, has
been foundational to the development of many modern programming languages and systems. It offers a mix of high-level
functionality and low-level access to memory and system processes, making it a powerful tool for a wide range of applications
Portability: With the standardization of C, programs written in this language can be compiled and run on many different types
of hardware with little or no modification.
Low-level Access: C allows for manipulation of bits, bytes, and addresses—capabilities that are essential for system
programming (like operating systems and embedded systems).
Minimal Runtime: C programs typically require minimal runtime support and can run with limited resources, making them
suitable for systems where resources are constrained.
Wide Acceptance and Use: C has been used for decades, creating a large ecosystem of existing libraries, frameworks, and
tools. It's also commonly used in education, providing a solid foundation in computer science concepts.
Language Flexibility: C provides constructs that map efficiently to typical machine instructions, and it has features that allow
for flexible system programming (e.g., direct memory access, pointer arithmetic).
Disadvantages of C Programming Language
Complexity in Managing Memory: Memory management in C is manual, requiring explicit allocation and
deallocation of memory. This can lead to errors such as memory leaks, dangling pointers, and buffer overflows.
Lack of Modern Features: Compared to newer programming languages, C lacks features such as namespaces,
classes, and exceptions. This can make large C projects harder to organize and maintain.
Steep Learning Curve for Beginners: The combination of low-level programming capabilities and manual memory
management can make C challenging for beginners to learn and use effectively.
Absence of Built-in Security: C does not inherently include protections against common programming errors like
array overruns, which can lead to security vulnerabilities.
Less Support for High-Level Programming: While C is incredibly powerful for system-level programming, it offers less
built-in support for high-level programming tasks like GUI applications or web development compared to languages
like Python or Java.
Error-Prone: The power of C comes with the risk of making mistakes that would be automatically handled in more
modern languages. Debugging such errors can be time-consuming and challenging.
C was developed in the early 1970s by Dennis Ritchie at Bell Labs. It is a procedural programming language, which
means it follows a set of sequential steps and procedures to execute a program.
C++ was developed in the early 1980s by Bjarne Stroustrup, also at Bell Labs. It extends C with object-oriented
programming (OOP) features, making it a multi-paradigm language that supports both procedural and object-
oriented programming.
C is often used for system programming, including writing operating systems, embedded systems, and low-level
libraries. Its simplicity and efficiency make it ideal for applications where performance and memory management
are critical.
C++ adds OOP features like classes, inheritance, polymorphism, and encapsulation. It's used in software engineering
where complex data structures and operations on them are needed, such as game development, high-performance
applications, and client-server applications
Java is a widely used programming language expressly designed for use in the distributed environment of the
internet. It was developed by Sun Microsystems (now Oracle) in the mid-1990s. Java's design principles are based on
simplicity, object-orientation, and portability, which contribute to its widespread use and acceptance. Like any
programming language, Java has its advantages and disadvantages, which influence its suitability for various types of
projects.
Advantages of Java
Platform Independence: Java's most significant advantage is its platform independence, thanks to the Java Virtual
Machine (JVM). Java programs are compiled into bytecode, which can run on any device equipped with a JVM,
making Java applications highly portable.
Object-Oriented: Java is an object-oriented programming (OOP) language, which makes it easier to manage complex
software systems. OOP concepts like inheritance, encapsulation, and polymorphism help in creating modular,
flexible, and reusable code.
Strong Memory Management: Java manages memory through automatic garbage collection, reducing the risk of
memory leaks and other memory-related errors that are common in languages like C and C++ where manual
memory management is required.
Multithreading Support: Java has built-in support for multithreading, which allows for the concurrent execution of
two or more parts of a program. This can improve the performance of applications that require high levels of
concurrency.
Rich Standard Library: Java provides a comprehensive standard library (Java API) that offers utility functions for
programming tasks, including networking, data structures, GUI development, and XML parsing.
High Security: Java offers a secure execution environment through the JVM, which includes a security manager that
defines the access rules for classes. Java's security features are a key reason for its use in web and enterprise
environments.
Large Community and Ecosystem: Java has a vast ecosystem with a wide range of tools, libraries, frameworks, and a
large community of developers. This ecosystem facilitates the development process and provides support for
virtually any type of application.
Disadvantages of Java
Performance: While Java performance is excellent for many types of applications, the abstraction layer provided by the JVM
can result in slower performance compared to natively compiled languages such as C or C++.
Memory Consumption: Java applications tend to consume more memory compared to those written in languages like C or C++.
The automatic garbage collection mechanism, while convenient, can also be unpredictable, occasionally leading to pauses in
application execution.
Verbose Syntax: Java has been criticized for its verbose syntax. Writing Java code can require more lines of code to accomplish
the same task as in more succinct languages, which can increase development time and reduce code readability.
Look and Feel of GUI Applications: While Java provides GUI development capabilities through Swing and JavaFX, applications
may not always match the look and feel of native applications on certain platforms.
Garbage Collection Overhead: Although garbage collection helps in managing memory, the process of garbage collection itself
can consume computational resources, potentially impacting the performance of Java applications, especially in latency-
sensitive environments.
Complexity in Learning for Beginners: The vastness of Java's libraries and the depth of its features can be overwhelming for
beginners, making the learning curve steeper compared to some other programming languages.
JavaScript
With about 12.4 million worldwide users, JavaScript is one of the world's most popular programming languages.
Because of its versatility and front-end and back-end applications, Javascript is frequently used to develop web
browsers, embedded hardware controls, games, and software systems.
Often, developers use this text-based language to add interactive elements to web pages, such as search boxes,
zoom features, or drop-down menus. Developers may access JavaScript code libraries and draw from pre-written
frameworks while creating web pages or applications. Some highly influential mobile applications, including Uber
and PayPal, were built from JavaScript's front-end frameworks.
Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility.
Since its introduction by Guido van Rossum in 1991, Python has become one of the most popular programming
languages worldwide, used in various domains such as web development, data analysis, artificial intelligence
(AI), scientific computing, and more. Despite its wide range of applications and benefits, Python, like any
language, comes with its own set of advantages and disadvantages.
Advantages of Python
Ease of Learning and Use: Python's syntax is designed to be intuitive and similar to the English language, which
makes it an excellent choice for beginners in programming. Its readability allows developers to understand and
debug code more quickly.
Versatile: Python can be used for a wide range of applications, from web development (using frameworks like
Django and Flask) to scientific and numeric computing (with libraries like NumPy, SciPy, and Pandas), to machine
learning (ML) and artificial intelligence (AI) projects (with tools like TensorFlow and PyTorch).
Large Standard Library and Ecosystem: Python comes with a vast standard library that includes modules and
functions for various tasks. Additionally, there's a rich ecosystem of third-party packages and frameworks
available through the Python Package Index (PyPI), covering almost any programming need.
Cross-Platform Compatibility: Python programs can run on multiple operating systems without requiring any
changes to the code. This makes Python a portable language and simplifies the deployment process.
Support for Multiple Programming Paradigms: Python supports object-oriented, procedural, and functional programming
paradigms, offering flexibility in how problems can be solved and systems designed.
Strong Community Support: Python has a large and active community, providing a wealth of tutorials, forums, and
documentation. This community support makes it easier to learn Python and find help when needed.
Integration Capabilities: Python can be integrated with other languages and technologies, including C, C++, and Java,
allowing for performance optimizations and the use of legacy code within Python applications.
Disadvantages of Python
Performance Limitations: Being an interpreted language, Python typically runs slower than compiled languages like C or
C++. This might not be ideal for applications where speed is critical, such as high-frequency trading applications.
Threading Limitations Due to GIL: Python's Global Interpreter Lock (GIL) is a mutex that protects access to Python objects,
preventing multiple threads from executing Python bytecodes at once. This can be a bottleneck in CPU-bound and multi-
threaded code, although it's less of an issue in I/O-bound applications or when using processes instead of threads.
Memory Consumption: Python's ease of use and flexibility come at the cost of higher memory consumption compared to
more low-level languages. This can be a disadvantage for memory-intensive applications.
Runtime Errors: Due to its dynamic nature, Python may allow code to compile and run that would be caught as an error in
statically-typed languages. This can potentially lead to runtime errors in production environments.
Mobile Development: While Python can be used for mobile app development, it is not as commonly used as other
languages like Kotlin or Swift for Android and iOS development, respectively. The ecosystem and tools for mobile
development in Python are not as mature.
Package Management: While Python's package ecosystem is robust, managing dependencies and environments can
sometimes be challenging, especially in complex projects. Tools like pip, virtualenv, and conda help, but dependency
management can still be a hurdle.
C# (pronounced "C-sharp") is a modern, object-oriented, and type-safe programming language developed by
Microsoft as part of its .NET framework. It was introduced in 2000 and has since become a widely used language
for developing a wide range of applications, including web, mobile, desktop, and gaming, particularly on the
Windows platform. Like any programming language, C# has its own set of advantages and disadvantages, which
can influence its suitability for specific projects or development environments.
Advantages of C#
Rich Library Support: C# benefits from the comprehensive .NET framework library, which provides a vast array of
pre-built classes and functions for developing applications more efficiently. This extensive library support
simplifies tasks such as database access, file operations, networking, and XML document manipulation.
Type Safety: C# is a statically-typed language, meaning that type checking occurs at compile-time. This reduces
runtime errors and enhances code quality and stability.
Cross-Platform Development: With the introduction of .NET Core, C# applications can now be developed and run
on multiple platforms, including Windows, macOS, and Linux, expanding its usability beyond the Microsoft
ecosystem.
Integrated Development Environment (IDE): C# is closely integrated with Visual Studio, Microsoft's powerful IDE, which
provides developers with extensive tools for debugging, code completion, project management, and version control.
This integration enhances productivity and simplifies the development process.
Versatility: C# is versatile and can be used to develop a wide range of applications, including web applications
(ASP.NET), desktop applications (Windows Forms, WPF), mobile applications (Xamarin), and games (Unity).
Community and Documentation: C# has a strong developer community and excellent documentation, making it easier
for new developers to learn the language and find support when needed.
Disadvantages of C#
Less Flexible Than Some Languages: While C# is versatile, it may not offer the same level of flexibility as languages like
Python, especially in areas like scripting, data science, and machine learning.
Disadvantages
Performance Overheads: Due to its high-level nature and garbage collection, C# may have performance overheads
compared to lower-level languages like C or C++. This can be a consideration for high-performance applications.
Primarily Windows-focused: Despite the cross-platform capabilities offered by .NET Core, many of C#'s features and
tooling are optimized for Windows and the Microsoft ecosystem, which can be a limitation for developers primarily
working on other platforms.
Learning Curve: For beginners, the vastness of the .NET framework and the object-oriented principles of C# can present a
steeper learning curve compared to more straightforward languages.
Resource Consumption: C# applications can be more resource-intensive due to the runtime environment (.NET CLR) they
run on. This might not be ideal for low-resource systems.
Dependency on Microsoft: C# and .NET are developed and maintained by Microsoft, which can be a concern for projects
aiming to avoid vendor lock-in or those that prioritize open-source solutions.
PHP
Hypertext Preprocessor, or PHP, is a server-side language primarily used for creating web servers. PHP is a
platform-independent language that works effectively with HTML and syncs with nearly all relational and non-
relational databases. It is another versatile and easy-to-learn scripting language. It is embedded in HTML and
utilized in interactive website features like e-commerce webpages.
PHP can be an excellent choice for web application development. Many industry-leading sites, including
Facebook, WordPress, Shopify, and Wikipedia, are built on PHP infrastructures. PHP is also open source, which
allows users to access and build upon numerous frameworks and collaborate with other users.
https://www.tiobe.com/files/TIOBEQua
lityIndicator_v4_15.pdf