News for hackers. Stuff that matters.
Re:The Elixir of concurrency by idobai on Monday May 23, 2016 @05:57PM (#11757381)
> Elixir's novelty, the pipe operator, is a fantastic approach to working with state in a functional manner. Instead of running readlines(fopen(user_input(), "r")).uppercase().split(), try the more readable user_input |> fopen("r") |> readlines |> uppercase |> split.

The pipe operator isn't Elixir's "novelty". Also, why is it better than the '.' syntax:

> fromFile(userInput).getLines.map(_.toUpperCase)

Do you get code completion for it as in an oop-ish language?

Re:The Elixir of concurrency by andy_ppp on Tuesday May 24, 2016 @02:34AM (#11759374)

    A |> B |> C second_param
Is the same as:

    C(B(A()), second_param)
It's much more powerful than that because you can create chains of functions that pipe their output i.e.

   Some_data
   |> fetch_reports
   |> email_users
   |> setup_notifications
   |> IO.inspect
   |> affirm_elixir_pipes
It's 100% not the same as dot or arrow! IO.inspect allows you to print details of any data being passed but also returns the first argument passed.

Hope this is a clear explanation of what is happening.