On Thu, Mar 24, 2022 at 10:20 AM Pierre <pierre-...@processus.org> wrote:
> > That was exactly my point: the type could simply implicitely be the one > of the original value. > > That works when the initial value is a literal, but what about when it's another cost? class Foo { const BAR = Baz::BAR; const BLING = MY_QUX; } What type are Foo::BAR and Foo::BLING? Suddenly these constants have dependent type and resolving it becomes less trivial. Also, what happens when this code is originally written when MY_QUX is a string, but then gets redefined (because it lives in another library we don't control). Allowing the author to put an explicit type removes all that uncertainty. -Sara