CTFE Status 2
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Wed Mar 15 11:52:16 PDT 2017
On Wed, Mar 15, 2017 at 03:59:46PM +0000, Stefan Koch via Digitalmars-d wrote:
[...]
> Unsupported Features include :
[...]
> - Floating point.
[...]
> - unions
[...]
What are the chances / what's the expected timeframe of unions being
implemented?
Support for unions in CTFE is a MAJOR milestone in making std.math
CTFE-able, which IMO will take D compile-time capabilities to a whole
new level, because it will greatly expand the scope of what's computable
at compile-time in terms of floating-point constants, lookup tables,
etc.. Imagine, for example, a precomputed table of values
transcendental functions with some given resolution, for fast runtime
lookups.
(Of course, this also requires floating-point support in CTFE. But that
should be relatively easy(?). As long as both the host and target
architectures support the same set of IEEE floating-point types, which
is probably the case for our currently-supported platforms.)
T
--
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
More information about the Digitalmars-d
mailing list