A Reference of Programming Elements

Photo by National Cancer Institute on Unsplash

The reason I decided to write this article is simply that I found determining the biggest difference between a spread of common languages to be a confusing and time exhausting process. A process that generally involved looking up the best language for X and often times any kind of detailed explanation as to why this might be involved an additional search of that respective language, a scroll through Wikipedia, and before you know it, there are 10-tabs worth of information open on your browser.
Here, I hope to layout an article that first describes at a high level the applicable descriptors of 10 popular languages and then the descriptors relevant to each of those 10 languages respectively.
To use this guide I recommend finding the description of the language you are interested in at the bottom of the page and then Ctrl/Cmd + F that language’s descriptors.

The languages will include C, C++, C#, Go, Java, Javascript, PHP, Python, Ruby, TypeScript.

The language descriptors used to describe those languages include compiled, component-oriented, concurrency, curly-bracket syntax, declarative programming, dynamic typing, event-driven programming, first-class functions, functional programming, garbage collection, general-purpose, generic, high-level, imperative programming, interpreted,
just-in-time compiled, lexical variable scope, low-level, memory safety, modular programming, multi-paradigm, object-oriented programming,
procedural programming, prototype-based programming,
significant indentation, task-driven programming,
reflective programming, static type,
strong typing, structured programming, transcompiles.

Source: https://rb.gy/lxvxl8

Language Elements

Compiled — code that has been translated from one programming language is said to have been compiled. At some point, code typically needs to be compiled before it can be executed by any kind of hardware.

Component-oriented — is the practice of separating code into components based on a separation of concerns and reusability.

Concurrency — “is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome. This allows for parallel execution of the concurrent units, which can significantly improve overall speed of the execution in multi-processor and multi-core systems.” Think async-await in Javascript.

Curly-bracket syntax — used to define statement blocks with curly brackets.

Declarative Programming — can be described as any style of programming that is not imperative. You tell your computer what you want to do, not how to do it. Think SQL, when you query a database, you are using commands to describe data you want as opposed to writing a program that fetching the data you want out of the database.

Dynamic typing — “languages are those (like JavaScript) where the interpreter assigns variables a type at runtime based on the variable’s value at the time.” This is in contrast with ‘Static typing’.

Event-driven programming— a programming paradigm where a program is guided by user interaction. It is the paradigm primarily associated with user-interfaces.

First-class functions — “…the language supports passing functions as arguments to other functions, returning them as the values from the other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions (function literals) as well. In languages with first-class functions, the names of the functions do not have any special status; they are treated like ordinary variables with a function type.”

Functional programming— a programming paradigm where programs are composed of functions, each function providing a value to be used by another function.

Garbage collection — “is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or just memory occupied by objects that are no longer in use by the program.”

General-purpose — “is a computer language that is broadly applicable across application domains, and lacks specialized features for a particular domain.” This is in contrast to a domain-specific language (DSL), which is specialized to a particular application domain.

Generic — “is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters.” This basically means you can assign a type to a class.

High-level “is a programming language with strong abstraction from the details of the computer.” Think binary as the lowest level and ‘no-code’ as the highest level.

Imperative programming— “…a programming paradigm that uses statements that change a program’s state.” This is in contrast with ‘declarative programming’.

Interpreted — can be executed by an interpreter without having been compiled.

Just-in-time compiled — the code is compiled during the execution of the program rather than before. So you don’t have to compile your code each time before you can execute it.

Lexical variable scope — the program text is separate from the runtime call stack by language implementation. Think function blocks, with lexical scope inner-scopes, can access outer-scopes.

Low-level — is a programming language the little abstraction from the details of the computer. Think binary as the lowest level and ‘no-code’ as the highest level.

Memory safety — “is the state of being protected from various software bugs and security vulnerabilities when dealing with memory access, such as bugger overflows and dangling pointers.”

Modular programming — “is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable, modules, such that each contains everything necessary to execute one aspect of the desired functionality.”

Multi-paradigm — supports more than one programming paradigms.

Object-oriented programming— “(OOP) is a programming paradigm based on the concept of “objects”, which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is that an object’s own procedures can access and often modify data fields of itself (objects have a notion of ‘this’ or ‘self’). In OOP, computer programs are designed by making them out of objects that interact with one another.”

Procedural programming— requires creating a list of step-by-step instructions which tell the computer what to do to finish a task. It uses a top-down approach and treats data and procedures as two different entities.

Prototype-based programming — the process of reusing existing objects that exist as prototypes. This is compared to the class-based paradigm. Click the link for an example.

Reflective programming — is the ability of a language to examine itself.

Significant Indentation — also known as the off-side rule, describes languages where code blocks are expressed by their indentation. This is in contrast with ‘curly-bracket syntax’.

Static type — “checking is the process of verifying the type safety of a program based on analysis of a program’s text (source code). If a program passes a static type checker, then the program is guaranteed to satisfy some set of type safety properties for all possible inputs.” Think Typescript compared to Javascript.

Strong Typingyour code is compiled strictly as written. By comparison, weakly typed languages will try to make loosely written code work using features such as type conversion in Javascript.

Structured programming — describes a language that uses control flow and loops.

Task-driven Programming — see concurrency.

Transcompiles “is a type of translator that takes the source code of a program written in a programming language as its input and produces equivalent source code in the same or a different programming language.”

Photo by Annie Spratt on Unsplash


C — “is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system.”

C++ — (or C with classes) is a general-purpose, object-oriented, generic, functional language that allows for low-level memory manipulation. It is also a multi-paradigm language in that it supports the procedural, functional, object-oriented, generic, and modular programming paradigms.

C# — (C sharp) “is a general-purpose, multi-paradigm programming language encompassing static typing, strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.” Other programming paradigms that are supported include structured programming, event-driven programming, task-driven programming, reflective programming, and concurrency.

Go — (Golang) is a statically typed and compiled language with memory safety, garbage collection, structural typing, and concurrency. It is a multi-paradigm language supporting concurrent, functional, imperative, and object-oriented programming paradigms.

Java — “is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.” Java is multi-paradigm which means it supports the generic, object-oriented (class-based), imperative, and reflective programming paradigms.

Javascript — is a high-level, just-in-time compiled, multi-paradigm language with curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions. As a multi-paradigm language, the event-driven, functional, and imperative programming paradigms are each supported.

PHP — “is a general-purpose scripting language suited for web development.” It is also a multi-paradigm language in that it supports the imperative, functional, object-oriented, procedural, and reflective programming paradigms.

Python — “is an interpreted, high-level and general-purpose programming language. Python’s design philosophy emphasizes code readability with its notable use of significant indentation.” Python is also dynamically typed, garbage-collected, and multi-paradigm in that it supports the functional, imperative, object-oriented, structured, and reflective programming paradigms.

Ruby — is an interpreted, high-level, general-purpose, multi-paradigm language in that it supports the functional, imperative, object-oriented, and reflective programming paradigms.

TypeScript — “is a strict syntactical superset of JavaScript and adds optional static typing to the language. TypeScript is designed for the development of large applications and transcompiles to JavaScript.”

And that’s a description of 10 popular program language with the definitions of the terms used to describe those languages through those descriptions and it is my hope that I perhaps saved you the trouble of opening up 10 tabs of information in an attempt to learn more about the nature of a language, it’s differences compared to other languages, of how to even write and execute programs in a particular language. I’ve definitely been in this situation with C++ and comping from JavaScript, it’s slightly disheartening when I look up a word used to describe the language to only need to lookup more concepts the even understand the word when just a high-level description would have sufficed in describing the nature of writing and executing the language.
Anyways, all comments are welcome below, or feel free to reach out on LinkedIn, I would love to chat. Thanks for your time!

Frontend Software Developer and Security Technician with experience in Ruby, Rails, JavaScript, and React. Flatiron Software Engineering Alumni.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store