August 2, 2023
Disable Optional Semicolons in CF2021
Comments
(1)
August 2, 2023
Disable Optional Semicolons in CF2021
Newbie 1 posts
Followers: 0 people
(1)

Hi,

Is it possible to disable optional semicolons in CF2021? We run CF2016 in our live environment, but I develop on CF2021 in anticipation of upgrading, but I occasionally get caught out by missing semicolons, which work locally but obviously don’t when pushed to the live server.

Thanks,
Geoff

1 Comment
2023-08-04 16:45:42
2023-08-04 16:45:42

Semicolons became optional in CF2018. What’s odd is that they are sometimes required to reduce ambiguity.
https://coldfusion.adobe.com/2018/07/writing-cfms-without-semicolons/

This issue occasionally happens to me, but I fear that disabling semicolons and then integrating modern third-party CFCs, UDFs & libraries in the future would not work.  I’ve been using CommandBox & TestBox to spin up different CFML servers to test code written on CF2021 to ensure that it’s both backwards as well as cross-compatible with Lucee CFML.

CROSS-COMPATIBILITY NOTE: A feature to “require semicolons” was requested for Lucee back in 2015 and was rejected. More info at https://luceeserver.atlassian.net/browse/LDEV-369

Like
Add Comment