Re:Building a Cloud Database from Scratch: Why We Moved from...
by j-krieger on Friday February 10, 2023 @11:55AM
(#34742253)
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.
[ Parent
| on HN ]
Re:Building a Cloud Database from Scratch: Why We Moved from...
by pdimitar on Friday February 10, 2023 @12:16PM
(#34742574)
Not 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.)
Re:Building a Cloud Database from Scratch: Why We Moved from...
by pantulis on Friday February 10, 2023 @12:08PM
(#34742463)
Not 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.
Re:Building a Cloud Database from Scratch: Why We Moved from...
by goatlover on Friday February 10, 2023 @12:15PM
(#34742556)
It'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.
Re:Building a Cloud Database from Scratch: Why We Moved from...
by iudqnolq on Friday February 10, 2023 @02:01PM
(#34744087)
Minor 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