|
|
|
|
|
by dnautics
2710 days ago
|
|
it's not nearly the same. Piping in elixir is a macro; it lets you preserve the other arguments in your function call. The IO.inspect(value, label: "label string") semantic is incredibly powerful. During debugging I often do this: value
|> IO.inspect(label: "A")
|> do_something
|> IO.inspect(label: "B")
|> do_something_else
|> IO.inspect(label: "C")
...
This gives me full visibility over the data transformations that are happening. And removing the IO.inspect's are trivial with an IDE like atom, vscode, etc. Also the way that the BEAM handles concurrent IO means that none of those strings that I send will be interrupted by other content, which is critical to interpretable println debugging in a concurrent environment. I haven't used the debugger (or IEX.pry, whic I hear is powerful) once. |
|