News for hackers. Stuff that matters.
Re:Elixir for Humans Who Know Python by calo_star on Saturday February 25, 2023 @05:43PM (#34941211)
One thing I love about Elixir's syntax is that virtually everything is a call, take the if statement:

  if condition do
    IO.puts "true"
    :yes
  else
    IO.puts "false"
    :no
  end 
is just a call to the *Kernel.if/2* macro:

  if(true, do: (IO.puts("true"); :yes), else: (IO.puts("false"); :no))
I was joyous when I realized I could pipe stuff into a case statement.

There are no comments on this comment yet.