Andrew Shitov
A Language A Day
A brief introduction to 21 programming languages
DeepText, 2024
Electronic editions
LeanPub (PDF, EPUB)
Amazon (Kindle): US, UK, DE, FR, ES, IT, NL, JP, BR, CA, MX, AU, IN
Paper editions
Amazon — hardcover: US, UK, DE, FR, ES, IT, NL, JP, BR, CA, MX, AU, IN
Amazon — paperback: US, UK, DE, FR, ES, IT, NL, JP, BR, CA, MX, AU, IN
This book provides a concise overview of 21 different programming languages. Each language is introduced using the same approach: solving several programming problems to showcase its features and capabilities. Languages covered in the book: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and TypeScript.
Each chapter covers the essentials of a different programming language. To make the content more consistent and comparable, I use the same structure for each language, focusing on the following mini projects:
- Creating a ‘Hello, World!’ program.
- Implementing a Factorial function using recursion or a functional-style approach.
- Creating a polymorphic array of objects (a ‘zoo’ of cats and dogs) and calling methods on them.
- Implementing the Sleep Sort algorithm—while impractical for real-word use, it’s a playful demonstration of language’s concurrency capabilities.
Each language description follows—where applicable—this pattern:
- Installing a command-line compiler and running a program.
- Creating and using variables.
- Defining and using functions.
- Exploring object-oriented features.
- Handling exception.
- Introducing basic concurrency and parallelism.
You can find all the code examples in this book on GitHub: github.com/ash/a-language-a-day.