{{< partial "learn_x_header" >}} It's not a secret that Programmers like a great holy war. The [echos of passionate programmers] shouting with their banners high will live on Stack Overflow for eternity, or at least [archive.org]. [The editor wars] rage on. Like other holy wars, object-oriented vs. functional programming is an ongoing saga. Most programmers use functional programming while considering themselves object-oriented programmers. Many languages have incorporated object-oriented and functional programming language paradigms. I've enjoyed using the functional features of C# and dabbled a bit with F#. I've never dove headfirst into a functional language like Elixir, until now. I picked it up because I like [The Pragmatic Programmer book] and Dave Thomas as an author. I'm also interested in being able to do [concurrent programming with less hassle]. ## Workflow My workflow is a split window with the book and my IDE side by side on my MacBook. I'm trying things out as the material progresses and am running through the exercises. {{< youtube "DuAa_v1K0Xw" >}} ## Programming Elixir As I traverse [the Programming Elixir book], I feel like I'm learning regular expressions. These terse expressions are power-packed; look at this beauty. ```elixir # The long way add_one = fn (n) -> n + 1 end IO.puts add_one.(1) # The short way add_one = &(&1 + 1) IO.puts add_one.(1) ``` Building quick little inline functions will take little effort. It's a bit cryptic for my tastes, but this is good if you're doing quick and dirty code for a single task. Look at that; with a few regular expressions and concise syntax, this code returns true. ```elixir match_end = & ~r/.*#{&1}$/ IO.puts "cat" =~ match_end.("t") ``` This code boggles my mind. I can have a set of regex libraries that are named appropriately. I can chain those expressions; what?! I've convinced myself that learning Elixir is worth the investment. ## Learning Elixir - Beyond the Basics - **Books** - [Programming Elixir by Dave Thomas] - [Elixir for Programmers by Dave Thomas] - **Visual Studio Code Extensions** - [vscode-elixir] ( Syntax Highlighting, Intellisense) - [Elixir Formatter] ( Code formatting ) - [Code Runner] ( Select and run code in your editor ) ## Related Content - [Learn Elixir by Creating a Command Line Application] - [Exercism.com] [archive.org]: https://web.archive.org/web/20240000000000*/https://stackoverflow.com/ [elixir]: https://elixir-lang.org/ [echos of passionate programmers]: https://stackoverflow.com/questions/2078978/functional-programming-vs-object-oriented-programming [the editor wars]: https://en.wikipedia.org/wiki/Editor_war [the pragmatic programmer book]: https://amzn.to/3dOFZYs [concurrent programming with hassle]: https://elixirschool.com/en/lessons/advanced/concurrency/ [the programming elixir book]: https://amzn.to/345btot [programming elixir by dave thomas]: https://amzn.to/345btot [elixir for programmers by dave thomas]: https://codestool.coding-gnome.com/courses/elixir-for-programmers [vscode-elixir]: https://marketplace.visualstudio.com/items?itemName=mjmcloug.vscode-elixir [elixir formatter]: https://marketplace.visualstudio.com/items?itemName=saratravi.elixir-formatter [code runner]: https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner [learn elixir by creating a command line application]: https://jorin.me/learn-elixir-by-creating-a-command-line-application/ [exercism.com]: https://exercism.org/tracks/elixir