Comment

Comment by nuerow

> I will admit that when I first read about constexpr my first thought was 'why can't the compiler figure this out automatically?'.

I would argue that the main value proposition of constexpr is not what the compiler can figure out automatically but allowing the developer to express where he wants constexpr and afterwards allow the compiler to verify if that's possible.

It's the difference between a soft "nice-to-have" requirements and a hard "must-have" requirement.

parent nuerow 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton