Professor Frisby's Mostly Adequate Guide to Functional Programming
Book Details
| Author | Brian Lonsdorf |
| Published | 2024 |
| Edition | 1st |
| Paperback | 151 pages |
| Language | English |
| License | Creative Commons Attribution-ShareAlike |
Book Description
This is a book on the functional paradigm in general. Brian Lonsdorf will use the world's most popular functional programming language: JavaScript. He acknowledges that some may feel this is a poor choice as it's against the grain of the current culture which, at the moment, feels predominately imperative. However, Lonsdorf believes it is the best way to learn FP for several reasons:
He notes that readers likely use JavaScript every day at work, making it possible to practice and apply acquired knowledge each day on real world programs rather than on pet projects in an esoteric FP language.
Lonsdorf points out that with JavaScript, one doesn't have to learn everything up front to start writing programs, noting that in a pure functional language, you cannot log a variable or read a DOM node without using monads. He explains that with JavaScript, learners can cheat a little as they learn to purify their codebase, and that it's easier to get started since it's a mixed paradigm language, allowing readers to fall back on their current practices while there are gaps in their knowledge.
The author asserts that the language is fully capable of writing top-notch functional code, having all the features needed to mimic a language like Scala or Haskell with the help of a tiny library or two. Lonsdorf observes that while object-oriented programming currently dominates the industry, it's clearly awkward in JavaScript, which he describes as being "akin to camping off of a highway or tap dancing in galoshes." He notes various challenges with OOP in JavaScript and suggests that to a lot of people, FP feels more natural anyway.
Lonsdorf states that typed functional languages will, without a doubt, be the best place to code in the style presented by this book. He positions JavaScript as a means of learning a paradigm, while leaving where readers apply it up to them. The author notes that luckily, the interfaces are mathematical and, as such, ubiquitous, suggesting readers will find themselves at home with Swiftz, Scalaz, Haskell, PureScript, and other mathematically inclined environments.
This book is available under a Creative Commons Attribution-ShareAlike license (CC BY-SA), which means that you are free to copy, distribute, and modify it, as long as you credit the original author and license any derivative works under the same terms.
If you enjoyed the book and would like to support the author, you can purchase a printed copy (hardcover or paperback) from official retailers.
Download and Read Links
Share this Book
[localhost]# find . -name "*Similar_Books*"
Beej's Guide to Network Programming
This practical guide offers a clear introduction to network programming using Internet sockets, commonly referred to as 'sockets programming.' While the sockets API originated in Berkeley, it has since been adapted across various platforms, including Unix, Linux, and Windows. Though the API can be overwhelming at first, this book simplifies the lea
Haskell: The Craft of Functional Programming, 3rd Edition
This book offers a comprehensive introduction to functional programming using Haskell, a powerful and modern functional language. It covers core concepts, practical applications, and advanced techniques, emphasizing clarity, correctness, and real-world relevance. The 3rd edition of one of the leading textbooks for beginning functional programmers i
Think Raku (Think Perl 6), 2nd Edition
The title of this book was originally Think Perl 6, but since Perl 6 has been renamed Raku, we have also changed the title of the book. Want to learn how to program and think like a computer scientist? This practical guide gets you started on your programming journey with the help of Raku (Perl 6), the younger sister of the popular Perl programming
Smooth CoffeeScript
CoffeeScript is a lucid evolution of JavaScript created by Jeremy Ashke-nas. Apart from the major change in explaining Coffee-Script instead of JavaScript, numerous other changes have been made andsections have been added, edited or removed. Everything that is expressed in this book is therefore solely the responsi-bility of the editor. In the sens
Beej's Guide to C Programming
This is an intro to C for folks who already know how to program in another language. The first half of the book is written in a tutorial style, while the second half is a reference section complete with examples (inspired by the incomparable Turbo C Bible). The goal is to keep this up-to-date with the latest C standards. This guide assumes that you
Programming Persistent Memory
Beginning and experienced programmers will use this comprehensive guide to persistent memory programming. You will understand how persistent memory brings together several new software/hardware requirements, and offers great promise for better performance and faster application startup times - a huge leap forward in byte-addressable capacity compar