On Friday, 29 May 2015 at 09:22:56 UTC, Martin Nowak wrote:
On Thursday, 28 May 2015 at 20:22:44 UTC, rumbu wrote:
- lack of a decimal data type - you cannot perform monetary
calculation using floating point.
http://dlang.org/phobos/std_bigint.html?
No. There is no scale in BigInt. 1 / 2 will result in 0 not in
0.5. If BigInt in D was inspired from java BigInt, the direct
equivalent should be java BigDecimal, but this does not exist in
phobos. Even if I keep a scale myself, there are missing features
like rounding. Anyway, I implemented my own decimal type :
https://github.com/rumbu13/sharp/blob/master/src/system/package.d#L2512,
but I would prefer that D will provide such types built in the
language, at least this was the intention many years ago:
http://dlang.org/d-floating-point.html
- lack of a chinese or japanese calendar in the std.datetime
module;
- missing of overflow checks for integral data types;
http://dlang.org/phobos/core_checkedint.html
Division overflow is not implemented (int.min / -1) and using a
linear syntax instead of a simple expression is not the best way
to convince people to switch sides.