CTFE ^^ (pow)

Jonathan M Davis newsgroup.d at jmdavisprog.com
Tue Mar 27 02:23:50 UTC 2018


On Monday, March 26, 2018 16:26:38 Guillaume Piolat via Digitalmars-d wrote:
> On Saturday, 24 March 2018 at 16:37:06 UTC, Manu wrote:
> > I'm not sure why I seem to have to defend the idea that it's a
> > *great
> > thing* that D (in theory; according to the advertising
> > brochure) does
> > away with these requirements.
>
> Manu is not the only one who has to write such programs because
> of ^^ (log, exp, cosh, sinh, tanh... need pow to be CTFE to be
> CTFE themselves).
> It's a lot more unconvenient, and plain different semantics
> (can't parameterize the table based on a compile-time value) when
> compared to having working CTFE.

I think that that we all agree that having these functions work with CTFE
would be great. The disagreement is mostly on how much of an inconvenience
it is or how big a deal that inconvenience is.

Ultimately, it's just a question of someone taking the time to do the work,
not whether the work is desirable. And fortunately, it looks like at least
some of those functions have had recent work done towards making them work
in CTFE (e.g. the PR that Walter linked to in another post).

- Jonathan M Davis



More information about the Digitalmars-d mailing list