Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal data type #681

Closed
danrubel opened this issue Dec 3, 2011 · 21 comments
Closed

Decimal data type #681

danrubel opened this issue Dec 3, 2011 · 21 comments
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant core-n P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@danrubel
Copy link

danrubel commented Dec 3, 2011

[user feedback]
Please include decimal data type. Even if it will not work in Javascript, it will be better to contain it for compliles apps

@floitschG
Copy link
Contributor

Not a VM bug.
Reassigning to library ('language' would be a good fit too).


Removed Area-VM label.
Added Area-Library label.

@floitschG
Copy link
Contributor

Issue #916 has been merged into this issue.

@DartBot
Copy link

DartBot commented Aug 29, 2012

This comment was originally written by stevenc...@gmail.com


Has there been any progress on adding a Decimal data type to Dart? This is a very important feature. I imagine it can be implemented with guidance from the GWT team. They were able to implement the Java BigDecimal in JavaScript.

@DartBot
Copy link

DartBot commented Sep 10, 2012

This comment was originally written by jesse.ros...@gmail.com


Big mistake by not adding native decimal data type. This could have been easily converted to a custom Javascript class to handle it in Dart2js and would allow accurate currency code to exist in Dart. I use it all the time in a C# and VB. Apparently, they have smarter software engineers working at Microsoft. I'm sure Doug Crockford is laughing at you like he did with IBM screwing over the Javascript community over the same issue.

Let me guess, you will add it later casing apps to crash. Java all over again.

@DartBot
Copy link

DartBot commented Sep 10, 2012

This comment was originally written by ravi...@ravib.com


Please consider adding support for a Decimal type to Dart. It's crucial esp. for applications that deal with financial data. Thanks.

--Ravi B.

@DartBot
Copy link

DartBot commented Sep 10, 2012

This comment was originally written by jn13...@gmail.com


Having a natively suported decimal is essential to any big-boy application. During our product discovery phase we are heavily weighing the ability to handle decimals since this is still a flaw for web development... in 2012.

@DartBot
Copy link

DartBot commented Oct 21, 2012

This comment was originally written by casper...@gmail.com


We should definitely have a base10/decimal type in Dart. 0.1 + 0.2 != 0.3 is one of the most often reported bugs in JavaScript. Many modern languages have support for this and IEEE-754 semantics is first and foremost an implementation-optimization detail.

@DartBot
Copy link

DartBot commented Jan 20, 2013

This comment was originally written by briansmai...@gmail.com


As much as I thought Dart was fantastic (and still do), I didn't realise that num did not support decimal numbers. I realise that Dart must translate to JS, and I perhaps that is why there is no decimal type. As we all know, we need decimals for money. To code around this issue is a bad use of programmer resources, and is very inefficient. I think that if Dart wants respect as a language, it needs decimal types. I guess internally it would be an int with the precision stored. If this has not been addressed PLEASE do. I can't see why this could not be compatible with JS. There is probably only one other thing that I dislike about Dart (thus far) - mostly it's great including the ide/editor.

@DartBot
Copy link

DartBot commented Jan 20, 2013

This comment was originally written by @a14n


Until that issue is fixed, you can use the 'decimal' package I've just uploaded on pub ( http://pub.dartlang.org/packages/decimal )

@DartBot
Copy link

DartBot commented Jan 21, 2013

This comment was originally written by briansm...@gmail.com


@alexandre. Thanks for that info. I had written my own which is not as great as yours, but does what I need for currency. It appears plenty fast enough for client-side code (Stopwatch()). I'll be quite happy to throw it away when I presume decimal is implemented.

@DartBot
Copy link

DartBot commented Jan 21, 2013

This comment was originally written by jesse.r...@gmail.com


I think It's time we admit the obvious joke that Dart has become. How many
years before you can get a working product out the door?

No decimal data type means Dart is a joke written by people that don't
support real applications.

Sad, but maybe if people start telling Google the true, they may take
their head out of their ass.

@DartBot
Copy link

DartBot commented Jan 21, 2013

This comment was originally written by @ahmetaa


@jesse This is an issue tracker, not a place to vent or curse. Dart platform is being developed for maybe less than 2 years. I think current state of it is amazingly advanced comparing to other languages.
Besides, perhaps %1 of the applications rely on decimal types. And there are third party libraries available until it is implemented in Dart. Be patient.

@DartBot
Copy link

DartBot commented Jan 27, 2013

This comment was originally written by george.moschovi...@gmail.com


Please add a decimal data type.

@DartBot
Copy link

DartBot commented Jan 28, 2013

This comment was originally written by jesse.rose...@gmail.com


Good luck

@DartBot
Copy link

DartBot commented Mar 17, 2013

This comment was originally written by gursugu...@gmail.com


Could you please give us a timeframe like m4 or m5 for the implementation? I think the convenience of decimal operations are needed in more than 1% of applications.

@DartBot
Copy link

DartBot commented Jun 7, 2013

This comment was originally written by charlie...@kissintelligentsystems.com


A native decimal data type is absolutely essential. Having worked in both the C# and Java worlds I can, it is something that is really important to developers. It really should be implemented as a native data type not via a Pub Package.

Its something Javascript does very poorly and fits very well Darts mission of easing development of complex client side web apps.

@floitschG
Copy link
Contributor

There is no plan to add decimals as numbers. We might eventually make a pub package (or take over Alexandre's if he is fine with that), though.
This will not happen before v1.


Added this to the Later milestone.

@DartBot
Copy link

DartBot commented Jun 10, 2013

This comment was originally written by @a14n


@florian no problem if it fits your needs.

@DartBot
Copy link

DartBot commented Jun 10, 2013

This comment was originally written by briansma...@gmail.com


@florian. It would be good to know why not after 1.0. Compared to
everything else that has been implemented in Dart, decimal does not seem
overly difficult. While I'm sure Alexandre's code is great, it would be
good to know what stops decimal being implemented in the language. I do
understand to some extent the JS conversion problems, however people
currently live with the limitations in JS. Then again, I'm not paying the
bills. PS: I think what you guys have done to-date is tremendous.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed triaged type-enhancement A request for a change that isn't a bug labels Feb 29, 2016
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-n and removed core-m labels Aug 31, 2017
@Lilyquist
Copy link

I'm amazed this isn't built into the language. This is my biggest disappointment as a newcomer to Dart. Dart is pitched as "batteries included" - but this gap makes that simply not true.

@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 22, 2018
@matanlurey
Copy link
Contributor

This looks unlikely to happen, and keeping this issue open for 8 years isn't doing favors.

@dart-lang dart-lang locked as resolved and limited conversation to collaborators Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant core-n P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants