[fpc-devel] Typed constants question
Marco van de Voort
marcov at stack.nl
Sat Jul 28 17:01:05 CEST 2018
In our previous episode, J. Gareth Moreton said:
> For a more fundamental question... why are typed and untyped constants
> treated differently?
Turbo Pascal allowed to write them, depending on a switch. $J.
Delphi adds {$writeableconst on} iirc.
But even when this is off, you can't be sure it is on in a different module,
so exported constants can never be folded in. (except of course as a global
optimizations)
I guess for a local (implementation) constant this could be checked?
More information about the fpc-devel
mailing list