4 ms·
I'm still fighting with Elixir and losing - for some reason I can't get my head around all the slightly different ways to initialise stuff.
by NordStreamYacht 6mo ago
I'm still fighting with Elixir and losing - for some reason I can't get my head around all the slightly different ways to initialise stuff.
- dnautics 6mo ago"slightly different ways to initialise stuff." can you elaborate? theres only what 11 datatypes in elixir?
- buzzerbetrayed 6mo agoPerhaps they are referring to the syntactic sugar around keyword lists? [a: 1, b: 2] == [{:a, 1}, {:b, 2}] Or maybe atom vs string keys in maps? %{a: 1} vs %{"b" => 1} Or keyword lists always needing to come last in lists? [some: :value, :another] # error [:another, some: :value] # valid Or maybe something else entirely. Those are just things I remember having to lookup repeatedly when I was first learning elixir.
- NordStreamYacht 6mo agoThese are the ones. I just can't remember them.
- dnautics 6mo agocompletely reasonable. eventually you internalize them, and the rules aren't that bad and are consistent.
- abrookewood 6mo agoDo you mean config and runtime variables etc (i.e. in Phoenix)?