CharlesO
I believe there is a similar case for including standard Decimal handling in Elixir just as Date and Time have been standardized as a core part of the language.
Your thoughts?
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
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
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 am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes.
We’re a small ...
New
Other Trending Topics
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #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)
aeden
While it wasn’t difficult to pull in the dependency, I agree that I expected it to be part of the standard lib.
ericmj
It’s currently being discussed in the core team if we should add the Decimal library to the elixir standard library. It may or may not happen.
The main reason the calendar types were added to core elixir was to have a common set of data structure all the libraries could use and work on. For decimal types we don’t have this need since afaik there is only one decimal library in the ecosystem.
If you want Decimal added to the standard library you need to argue what the benefits would be.
CharlesO
But you have just pointed it out Eric …
— If you use Ecto, you automatically pick up this dependency.
Also, HEX places Decimal in the Top 6 libraries …
Having decimal in the language just seems natural.
Unless you know of any Erlang plans to support it as a generic type, I think it’s a good fit for the type of stuff Elixir should offer by default.
ericmj
That’s not really an argument, except that it’s popular. The webserver cowboy and dependencies are even more popular, should they also be included in core elixir?
Every extra module in core elixir puts extra burden on the elixir core team. That means less new features and less bug fixes for the existing code in the standard library. The more code the community can take care of the better and with the dependency handling in mix and package management in hex it’s not that much extra work to use a dependency.
tallakt
We need to have a long timeframe in mind here. Though I agree that a Decimal built-in would be useful, it does not add much value to add it right now. As there is only one Decimal implementation in use, we should continue using that. At the point where there suddenly for some reason exists alternative Decimal implementations, that would be a much better time to discuss adding it to stdlib, as the problems/design challenges involved would be much better known.
So my vote goes to postponing this at least a few years in time…
hubertlepicki
I guess it would make only sense to have it part of the core if it was a simple type, that could use +/-/* operators. If we kept the need to use Decimal.add and friends , this can very well be a separate lib.
Qqwy
I agree with this sentiment.
Unfortunately, as
+,-, etc are not expected to be overridden because they would stop working in guard clauses (There’s some things we just cannot do in guard clauses right now), I don’t think this will happen anytime soon.bbense
FWIW, I have been experimenting with an alternative approach to the Decimal Library.
IMHO, the underlying data structure is not a “solved” problem. Until there is consensus on the underlying data structure, I think putting it in Core is not reasonable.