<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1561.2">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px 'Inconsolata-dz for Powerline'}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px 'Inconsolata-dz for Powerline'; min-height: 16.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #011892}
p.p4 {margin: 0.0px 0.0px 0.0px 24.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #008e00; min-height: 16.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 24.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #008e00}
p.p6 {margin: 0.0px 0.0px 0.0px 12.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #011892; min-height: 16.0px}
p.p7 {margin: 0.0px 0.0px 0.0px 12.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #011892}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px 'Inconsolata-dz for Powerline'; min-height: 16.0px}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px 'Inconsolata-dz for Powerline'}
p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #011892; min-height: 16.0px}
p.p11 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px 'Inconsolata-dz for Powerline'}
p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #000000; min-height: 16.0px}
p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Inconsolata-dz for Powerline'; min-height: 16.0px}
p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Inconsolata-dz for Powerline'; color: #929292}
</style>
</head>
<body>
<p class="p1">On 2018-01-11 18:15:23 +0000, rumbu said:</p>
<p class="p2"><br></p>
<p class="p3">On Thursday, 11 January 2018 at 11:19:41 UTC, Robert M. Münch wrote:</p>
<p class="p4"><br></p>
<p class="p5">Great stuff! Will this work in betterC mode?</p>
<p class="p6"><br></p>
<p class="p7">It will not work without some refactory. Most of phobos/druntime dependencies are minimal an can be rewritten - in fact there are only 9 dependencies: bsr, bsf, addu, subu, adds, subs from druntime and isNaN, isinfinity, signbit from std.math.</p>
<p class="p6"><br></p>
<p class="p7">The rest of the dependencies are simply traits that must work by default under betterC.</p>
<p class="p8"><br></p>
<p class="p9">Ok, that doesn't sound impossible.</p>
<p class="p10"><br></p>
<p class="p7">Once dependencies are solved, another problem will be the exception mechanism. 90% of arithmetic operations are meant to throw exceptions, but this can be overridden by the alternate exception handling - raising and setting flags.</p>
<p class="p8"><br></p>
<p class="p9">Yes, makes sense.</p>
<p class="p8"><br></p>
<p class="p7">BUT - a very big but - the most important issue is the formatting thing.</p>
<p class="p11">...</p>
<p class="p7">a printf equivalent for decimal types is rewritten from scratch or - decimal values must be converted to binary float before printing them - but this will negate the main purpose of the decimal type - precision.</p>
<p class="p8"><br></p>
<p class="p9">Well, I think even using a decimal128 for some calculations to have higher precision intermediate results and only converting them to float for UI interaction would make a lot of sense.</p>
<p class="p8"><br></p>
<p class="p9">At least in our use-case, that would be quite interesting.</p>
<p class="p8"><br></p>
<p class="p9">Looking forward to see some benchmarks.</p>
<p class="p12"><br></p>
<p class="p13"><br></p>
<p class="p14">--<span class="Apple-converted-space"> </span></p>
<p class="p14">Robert M. Münch</p>
<p class="p14">http://www.saphirion.com</p>
<p class="p14">smarter | better | faster</p>
</body>
</html>