scottswezey
I spent a while implementing Erlang’s :lists.prefix in Elixir today, only I wasn’t aware it existed in Erlang. So now I’m curious if the core team generally accepts PRs that wrap Erlang functionality. I wouldn’t mind contributing some of this “missing” functionality, if the PRs would be considered. Does anyone know? Should I ask the elixir-lang-core mailing list instead?
My arguments for wrapping Erlang functions in Elixir:
- Similar functions, like Elixir’s
List.flatten/2andList.foldl/3,already exist and delegate to Erlang. - It would mostly require rewriting the specs, docs, and tests. That sounds simple enough to me. (But I could be wrong.)
- Documentation in Elixir’s modules is more visible than Erlang’s. I think that is inherently “better,” even though Erlang can be called directly.
The potential downside is maintaining the code, should it ever change in Erlang.
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
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
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
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
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
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
- #elixirconf-us
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hauleth
Sometimes yes, sometimes no, it depends. In general Elixir try to avoid “plain delegation” to the Erlang modules and unless there is some wrapping/argument reordering/backward compatibility requirements then it is better to just use OTP modules directly (Ockham’s law in practice).
Some of them may be compatibility reasons.
Simple, but brings unnecessary maintenance burden on core team.
I disagree. It is a little bit harder to start, but Erlang documentation is superb resource of knowledge, and with little tooling it is no harder to browse than Elixir documentation (I am talking only about Erlang/OTP docs, not EDoc output which for some reason is completely different).
josevalim
For modules that already exist, we would likely accept such PRs to complement them. For example, the List module started as a complement to Enum for list specific functions and to provide a zero-indexed API. However, if a PR is to add a wrapper for whole new modules, such as
:binaryor:ets, then the answer is likely no exactly because you can use them directly.PS: note in this particular case there is
List.starts_with?/2.scottswezey
Thank you both for letting me know about the PRs policy. It sounds like what I had in mind would be better off as a separate package, if it needs to exist at all.
I can’t believe I missed
List.starts_with?/2.