4 ms·
I love the idea of Elixir, but I just can't get into it because of its weird choice of sigils. |> for pipes and <- for assignments, seriously? I seriously disli
by selfmodruntime 4y ago
I love the idea of Elixir, but I just can't get into it because of its weird choice of sigils. |> for pipes and <- for assignments, seriously? I seriously dislike programming languages which choose two character sigils for basic operations. I also heavily dislike |x| in Rust.
- pantulis 4y agoNot to get on the merits of Rust or Elixir, but while you are absolutely entitled to your preferences I should suggest that perhaps you may miss out something important by ditching languages based purely on the format of sigils.
- goatlover 4y agoIt's like whitespace in Python, parens in Lisp, begin/ends in Ruby, or 1-based arrays in Julia. You get used to it and eventually it feels natural when using that language.
- pdimitar 4y agoNot going to judge you. When you feel a bit more generous and adventurous, I recommend you give it another go. Syntax is easy enough. Like all programming languages, you'll get used to it in a weekend and won't even notice it afterwards. Elixir is absurdly productive: very terse code, very self-explanatory stdlib API, transparent concurrency / parallelism, and in-OS-process high availability and mostly-self-healing hierarchy of green threads and supervisors observing them. People on HN and Reddit really love to roll their eyes at stuff that's getting popular, and likely will avoid the technology out of a misplaced spite, just because a lot of people are talking about it. It's a weird phenomena. (Not saying you're doing it, I just kinda got carried away here.)
- iudqnolq 4y agoMinor clarification: Elixir uses = for assigment. There's a special construct called "with" that's basically fallible pipes, and that's probably where you saw <- with {:ok, id} <- get_id(), {:ok, val} <- get_val(id) do show_success(val) else {:error, e} -> # We reach this if either get_id or get_val fails show_error(e) end
- lenkite 4y agoEven F# uses |> for pipes and Rlang uses <- for assignments. This is not a Elixir only thingy.