Re:Proposal to add constexpr to C [pdf]
by bobthebuilders on Saturday October 16, 2021 @07:12PM
(#28892419)
What? Why would fib(35) be evaluated at comple time? What if it's fib(1500)? The computers I want to run the program on is way faster than the pi I use for development.
[ Parent
| on HN ]
Re:Proposal to add constexpr to C [pdf]
by dataflow on Saturday October 16, 2021 @07:18PM
(#28892451)
> What? Why would fib(35) be evaluated at compile time?
Same reason why fib(2) might be.
> What if it's fib(1500)?
Are you familiar with exponential growth? This would take longer than the heat death of the universe, whether you evaluate it at compile time or run time...
Re:Proposal to add constexpr to C [pdf]
by bobthebuilders on Sunday October 17, 2021 @03:17PM
(#28898961)
Right, but maybe a military supercomputer could compute such a thing. I know my pi surely can't.