karlosmid
The
|>operator appears in many languages, mostly in the functional world. F# has essentially the exact same operator, as does OCaml. Elixir has a slightly fancier version (which we considered but ultimately decided against for now)
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
New
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project.
My initial shotgu...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #iex
- #graphql
- #elixirconf-us
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cmo
What is fancier about the Elixir one than the F#/OCaml one?
sbuttgereit
If I’m reading that page correctly, the right-hand side only allows for functions expecting a single argument whereas in Elixir the left-hand side becomes the value of the first argument on the right-hand side. My understanding comes from this line in the page linked:
All of their examples seem to support this:
There’s some syntax in that example I’m not familiar with (last time I did any serious PHP was in 2007), but my guess is that would be the difference.
derek-zhou
Ocaml and F# have currying, so they don’t need to support more than 1-arity. Elixir has established a convention of treating the first argument as the “subject”, so piping into the first argument makes sense. In PHP’s case, there is neither currying, nor established convention for argument order. I think piping will be not be as elegant here.
mayel
Maybe they need something like we have in Arrows — arrows v0.2.1
AstonJ
While on the topic of PHP there was a nice article about it just yesterday on Devtalk..
As much as I was never a fan of the syntax, it’s hard to deny that PHP sites can run well without issue for a decent period - I still manage some forums (running on PHP) that haven’t been updated in 15 years!
sodapopcan
I still use it for small server-side interactions (though not for anything that has survived). It’s still the obvious choice for that that kind of thing, but lordy can I never get used to
$.jam
It’d be nice if Elixir core had all the
arrowsfunctionality baked insodapopcan
This is a dead horse that has been thoroughly beaten several times over. It’s never going to happen, but there are several options if you really want it.