This is quite simple to move forward with (if you still care to). Make a PR. Until there's actual code to discuss, we're debating the benefits and drawbacks of theoretical implementations.
"In theory, theory is no different than practice. In practice though . . . " It also strikes me as a little bit impractical for someone to say "we should add decimal types to the core of the language" when that someone is not part of the "we" that will build actual code. :) Please don't misunderstand; I am not saying that you wouldn't help build the code. I am saying that if you are going to help implement this feature then that's another reason to stop debating theoretical merits and get on with implementing the idea. Just my observations. -- Onorio On Thursday, June 30, 2016 at 5:38:00 PM UTC-4, elxi...@gmail.com wrote: > > First of all thanks everyone the constructiveness and the great ideas. > I'm new to Elixir, so please forgive me if I've some bad assumptions. > > 1. Supporting number format like 1.32f or 12.45d, etc would be great > 2. Regarding using the regular arithmetic operators like +, -, * and / > for decimal type, I fail to see why it would be slower for integers for > example. At the end I'd assume only the generated byte code matters. So > why > not generated the usual byte code when integers or floats are used and > generate some advanced logic when the operands are of decimal type? > 3. Guards, following Peter's suggestion and using some logic for byte > code generation (as mentioned in point #2) again I think it would be > possible to handle decimal types transparently. > 4. I think simplifying a couple of things, like handling the decimal > types (which is a must for financial apps)/removing boiler plates, would > have a positive effect on language adoption as well > - I know it's off-topic, but it might worth mention that such > simplifications could do wonders, Elixir is great language but why not > make > even better out of the box, like: > - instead of specifying a method like this: > @spec add(number, number) :: number > def add(x, y), do: ... > > it would be far easier to write it a single line like this: > defs add(number x, number y) :: number, do: ... > - or embrace the familiar lambda syntax for defining in-line > functions, so that parameters could be referenced by their name, > instead of > their position > - etc > > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/d2c9f881-1339-4ed2-9771-7e4d29592bb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.