Choices of programming




  Choice of Programming Language and Tools
Programming languages come in many different flavors. A programming language typically supports one or more programming styles or paradigms: structured, imperative
(procedural, object-oriented), declarative (functional, logical), concurrent, parallel.
Properties of programming languages that I consider relevant:
personal programming software engineering
computer science


The force field in which to place a CS/‘programming’ course
Figure 1 shows the three forces that need to be balanced in a computer
science course on/using programming, both in setting the goals and choosing
the means. The same holds for a competition like the IOI. These forces pull
towards the three ‘pure’ topics:
computer science teach general concepts and insights from computing
personal programming teach a programming language for personal use
software engineering teach how to develop software beyond personal use
I call it ‘personal programming’ here to avoid confusion with ‘professional programming’ as applied in software engineering.
Note that these three goals are overlapping but quite distinct. A course and
contest must be positioned in this force field, especially when no prior knowledge is presumed. Paying more attention to one aspect will detract attention
from other aspects. It is true that through (personal) programming, most of
Denning’s great principles of computing can be visited, provided the trip is
carefully planned. It is also the case that many lessons from software engineering are valuable (some would even say indispensable) when doing personal
programming.
Should these topics be addressed in some particular order? It seems to make
little sense to start on software engineering without a background in computer
science and programming. On the other hand, one can start to address software
engineering principles and practices early on. For instance, to write program
code that is readable and understandable, 


through proper indentation, spacing,
comments, naming, and structuring. One can write comments that document
the interfaces of functions and classes. One can think about testing, and write
unit tests.
4 Choice of Programming Language and Tools
Programming languages come in many different flavors. A programming language typically supports one or more programming styles or paradigms: structured, imperative (procedural, object-oriented), declarative (functional, logical),
concurrent, parallel.
Properties of programming languages that I consider relevant:
8
Fig. 1. The force field in which to place a CS/’programming’ course.
Programming, Software Development, and Computer Science – The Golden Triangle 165
● Degree of formality (of syntax and semantics)
• Informally described algorithms, such as in Cormen (2013);
• More formal pseudo code, such as in Cormen et al. (2009);
• Real’ (machine executable) languages.
● standardized by international organization (ISO, IEEE, ECMA, ANSI),


 ● vendor-specific and commercial, versus open-source,
● having up-to-date and supported implementations,
● widely used in industry, versus academic,
● usable by beginners,
● with a large user community,
● for a broad range of applications (including support for GUI, graphics, database
connection, internet protocols),
● with good execution performance (speed, memory),
● availability of user-friendly tools (IDE, profiling, testing, documentation generation, integrated version control),
● availability of courses and textbooks.
Here is the list of programming languages that I considered (all are higher level,
general purpose, structured). They are split into two groups, and each group is roughly in
chronological order. The first group (above the line), I consider serious candidates, and
the second group is there mostly because others wanted me to consider them.
(Object) Pascal, Delphi From 1970s, imperative object-oriented (not pure), compiled
or interpreted, ISO standard (but that is dated), simple readable syntax, strong static typing, reasonably good compilers and IDE (also open source); used to be the foundation of
MacOS; kept alive by Embarcadero (Delphi is vendor specific)


 C From 1970s, imperative, ISO standard (current: C18), imperative (not object-oriented), weak static typing, efficient, enforces thinking about low-level optimizations
(adorned assembly language), quirky syntax, good (open-source and commercial)
compilers and IDEs, favorite for embedded systems (control) not so good for beginners (memory management, robustness); is the basis of the Unix (and nowadays, Linux)
operating system
Scheme From 1970s, functional (not pure), IEEE standard (current: 2008?); Lisp dialect; based on lambda calculus
Effel From 1980s, imperative object-oriented, with support for Design-by-Contract,
ECMA-ISO standard (current: ECMA-367 from 2006)
Erlang From 1980s, functional and concurrent, aimed at critical high-reliability highavailability systems (hot swapping; think of telephone exchange systems that need to
run without downtime)
Java From 1990s, imperative object-oriented (not pure), strong static typing, open standard, commercial owner (Oracle), via interpreter (JVM), C-like syntax, garbage collected, exception mechanism, good compilers and IDEs, favorite for Android mobile
platforms, lots of textbooks
166 T. Verhoeff
Python From 1990s, imperative object-oriented with functional features (not pure), 


dynamic typing (supports explicit type annotations since v3.5), open source (Python Software Foundation), interpreted, clean syntax4
, extensive libraries, favorite for scripting
and coordination
ECMAScript (better known as JavaScript) From 1990s, imperative object-oriented
with functional features (not pure), interpreted, ECMA standard (current: ES2018); Clike syntax, dynamic typing, good interpreters (e.g., in web browsers), favorite for web
programming (client side, nowadays also server side, and for mobile apps); also see
Kernighan (2017); Verhoeff (2010)
C++ From 1990s, modernization of C, imperative object-oriented with functional features (not pure), ISO standard (current: C++17), efficient, good (open-source and commercial) compilers, favorite for embedded systems and high-performance computing,
not so easy for beginners
Haskell From 1990s, pure functional, lazy, based on category theory
Scala From 2000s, object-oriented and functional (not pure), runs on JVM
______________________________________________________________________
Fortran From late 1950s, imperative with object-oriented extensions, ANSI-ISO-IEC
standard (current: Fortran 2018), favorite for high-performance computing
Mathematica, Wolfram Language From late 1980s, commercial (Wolfram), focused
on applying mathematics
MATLAB From 1980s, commercial (MathWorks), favorite for scientific/engineering
modeling and simulation
R From late 1990s, a language and environment for statistical computing and graphics.
Open source; based on S from the late 1970s.
Scratch From 2000s, block-structured visual, aimed at children
Go From late 2000s, imperative, C-like, commercial (Google), aimed at server-side networked applications
Swift From 2010s, commercial (Apple), aimed at mobile platform
Dart From 2010s, commercial (Google), ECMA standard, aimed at web, mobile, internet-of-things (IoT)
SageMath open source, alternative for Mathematica
Octave open source, alternative for MATLAB
The choice is not easy, and it is surprising that the CS community has not (yet?) been
able to come up with a lingua franca (compare this to mathematics, where the situation
is considerably better). This is also known in the IOI community. There are many tradeoffs. If one wants to take popularity into account, then also consult TIOBE Index (2019).
4 My main gripe is that the symmetric 


= is used for assignment, a bad heritage from C.
Programming, Software Development, and Computer Science – The Golden Triangle 167
Keep in mind that students (in engineering) should learn (about) multiple programming
languages and paradigms.
Nowadays, I lean more towards a functional language. This is well explained by
Simon Peyton Jones in Heath (2017): “If you want to see which features will be in mainstream programming languages tomorrow, then take a look at functional programming
languages today.” The tendency is towards side-effectfree functions and immutable data,
because these are so much easier to reason about and parallelize.
Since Python introduced type annotations that are supported by some of the tools
(notably PyCharm5
), it has moved up considerably in my list. When I don’t need the
highest performance and don’t need 3D graphical output, Python is my preferred language. Together with the Jupyter notebook technology6
, it provides a very productive interactive experience. For high performance programs, I prefer to generate C or C++ code
from higher-level models through some higher-level domain-specific language (DSL).

Media click - content specialists team

lion Media lion productions , media publisher , magazitta staff

Post a Comment

Previous Post Next Post

Contact Form