[Pas2js] pas2js doesn’t support -Sj
Michael Van Canneyt
michael at freepascal.org
Sat Feb 1 09:33:22 CET 2020
On Sat, 1 Feb 2020, Mr Bee via Pas2js wrote:
> Hi,
> Just update my pas2js to v1.5 (trunk). It seems pas2js doesn’t support -Sj option (writeable constant). Would you please support it? I think writeable constant is a design mistake of Pascal language by Borland that we have to deal forever. Personally, I always disable it, since I knew it could be disabled. FPC should disable it by default too, at least on ObjFPC mode. A constant should never be writeable, ever.
I don't understand what you want ?
Do you want consts to be writable or not ? You ask for a switch but at the
same time advocate against writable const ?
That said:
I really don't think we should support this. Not any more.
If 20 years after the demise of Turbo Pascal we cannot expect people
to change a couple of consts into a var, then all hope for humanity
(well, at least the pascal programming community) is simply lost.
FPC was created when TP still existed. It made sense to allow writable
const for easy porting. Same for Delphi. But IMHO not in a new tool 25 years after the facts.
I would not stop patches that implement this, but I consider this very low
priority indeed.
Michael.
More information about the Pas2js
mailing list