b/bonnybooks by cuongnhung1234

A Language a Day : A brief introduction to 21 programming languages

A Language a Day : A brief introduction to 21 programming languages

English | 2024 | ISBN: NA | 240 Pages | PDF, EPUB | 1.7 MB

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. Start with the basics of the language and progress through functions and objects to creating programs that use parallel and concurrent features!

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

1. Creating a ‘Hello, World!’ program.

2. Implementing a Factorial function using recursion or a functional-style approach.

3. Creating a polymorphic array of objects (a ‘zoo’ of cats and dogs) and calling methods on them.

4. 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

1. Installing a command-line compiler and running a program.

2. Creating and using variables.

3. Defining and using functions.

4. Exploring object-oriented features.

5. Handling exception.

6. Introducing basic concurrency and parallelism.

You can find all the code examples in this book on GitHub: github.com/ash/a-language-a-day.