Documenting my journey in Elixir world.
Day 1 - Elixir Data structures
I like functionnal programming and I was pursuing some interest in Clojure, but seems like I’m doomed to have no friends 😞, people hate the
(()(()))
so much, as much as I tried, the experience of a beginner is fairly unfriendly. Tbh I don’t think it’s that big a deal.In 2018, I missed the opportunity to contribute to an Elixir code because I wanted to excel in front-end, I guess it’s always time to catch up.
Okay, so on first day of school, I’m going through some chapters of this https://elixirschool.com/en/lessons/basics/collections
If I find Elixir very compelling, like everybody seems to say so .🐑🐑🐑. I’ll probably going to get a copy of a book and read it cover to cover.
I’ve mostly spent most of my career programming in JavaScript/Typescript. It’s pretty pleasant to do some basic programming operations without thinking about the quirks of the language. ie: comparing two maps/objects
Of course, starting a new task by bikeshedding around setting up emacs, because why not.
I was looking for a REPL dev experience close to what Clojure offer: being able to send lines of code to a REPL and evaluate it. I found this
inf-elixir
J3RN • Updated Aug 5, 2023
Going through data structures
- Random thoughts:
- Wow i can just deep compare map to another map and it works ? 🤯 exploding in JS.
iex(63)> %{:foo => "bar"} == %{:foo => "bar"} true iex(64)> %{:foo => "bar", :baz => %{:lol => "mdr"}} == %{:foo => "bar", :baz => %{:lol => "mdr"}} true iex(65)> %{:foo => "bar", :baz => %{:lol => "mdr"}} == %{:foo => "bar", :baz => %{:lol => "xd"}} false
- Keywords list
- Maps
- List
- Tuple
iex(60)> name = "George" "George" iex(61)> name = "Georgia" "Georgia" iex(62)> name "Georgia"