The pipe operator seems silly until you learn to pipe into IO.inspect. for vscoders I use this snippet ( https://slickb.it/bits/70 ) which also labels with the line numbers, meaning you can multiline select a bunch of lines in your pipeline and when you're done ninja them out with another multiline select (usually line numbers have the same number of characters around each other). In combination with triggering singl…
I think OP's point about building huge systems with pipes is well taken. They can become confusing when the break and over-use can be a code smell. Their power, as you point it, is in the ability to jump into any statement and add another action with minimal syntax. It's extremely useful while iterating on development because you can quickly check that something works (or check on what is happening).
Ten years without Elixir
31–40 of 144 posts
Re: Ten years without Elixir
#32This might, impressively, be the worst Webdesign I ever saw
Re: Ten years without Elixir
#33From the perspective of someone coming the other direction (a developer working almost entirely with Elixir that needed to jump to Erlang docs occasionally), it's interesting to see the note on docs, and honestly the vibe I get from this blog post feels related to my personal overall gripe with the Erlang community. To be blunt, I really dreaded needing to jump to the Erlang documentation, largely because of a percei…
And something to work on for sure.
Re: Ten years without Elixir
#34Re: Ten years without Elixir
#35In many cases, Erlang has a simplicity that is largely unmatched. I love the pipe operator and it's something I miss in a lot of languages, but just as often I miss the simple form of Erlang as well, being able to just define a series of simple, immutable clauses. In some sense, two ways to solve the same problem.
I always found Erlang syntax, much different but once you get use to it, very simple.
Docs, on the other hand, truly not the greatest thing :).
Re: Ten years without Elixir
#36The pipe operator seems silly until you learn to pipe into IO.inspect. for vscoders I use this snippet ( https://slickb.it/bits/70 ) which also labels with the line numbers, meaning you can multiline select a bunch of lines in your pipeline and when you're done ninja them out with another multiline select (usually line numbers have the same number of characters around each other). In combination with triggering singl…
I think OP's point about building huge systems with pipes is well taken. They can become confusing when the break and over-use can be a code smell. Their power, as you point it, is in the ability to jump into any statement and add another action with minimal syntax. It's extremely useful while iterating on development because you can quickly check that something works (or check on what is happening).
Re: Ten years without Elixir
#37From the perspective of someone coming the other direction (a developer working almost entirely with Elixir that needed to jump to Erlang docs occasionally), it's interesting to see the note on docs, and honestly the vibe I get from this blog post feels related to my personal overall gripe with the Erlang community. To be blunt, I really dreaded needing to jump to the Erlang documentation, largely because of a percei…
I could see that, my biggest gripe with Erlang has always been around the "softer edges" - easy to grok tooling, easy to read documentation, etc. And something to work on for sure.
Re: Ten years without Elixir
#38Re: Pipe operator Their argument for replacing the pipe operator is to do this instead: foo(X) -> final_function(maybe_function(X)). into this: foo(X) -> Maybe = maybe_function(X), final_function(Maybe). instead of this: x |> maybe_function() |> final_function() Their exact words: Spelling things out so pedantically makes code dead-simple & clear. Yes, there is a tad more code, but you will also note that nothing is…
It seems to me that one of the benefits of the pipe operator is that it very clearly lays out the steps involved, aka
x
|> maybe_function()
|> final_function()
so that the code is dead-simple and clear. It doesn't seem nested in the say way that final_function(maybe_function(X)) is.Granted, I don't have nearly the level of experience of the author so I can't say for sure, but it seems to me like they just haven't had enough experience with the pipe operator to see how it benefits the code "beauty".
Re: Ten years without Elixir
#39Content aside, I don't get why people keep criticizing the site design, and I say that as a frontend dev. This appears to be the personal blog of a lone Erlang developer-- why should they put in effort to make bring it up to current design standards? It does what it's designed to do. It conveys information in a simple, readable way, same as HN itself. IMO there's nothing worth criticizing here. edit: typo
I'm curious what makes this an out-of-date design. Did easy to read go out of style at some point?
As far as I'm concerned this is the purest form of a text based blog. Pure content, decent font, Good contrast, no bullshit popups or animations to distract from the point.
Re: Ten years without Elixir
#40As for his opinion on the pipe operator, I have to wonder what he thinks of do-notation and point free style in Haskell, let alone APL and its ilk.