"Strict" decision functions?

Please no. Stuff like this only works if the app is responsible for 100% of the code it is running, and one uses zero third-party code. And TBH, I’m not sure app-design like that ought to be encouraged or enabled.

It also makes app code “magical” as it’s not clear from looking at the code exactly what it actually does.

If you want a strict check: use a strict check. If you want a close-enough check, use the woolly ones.


Adam

2 Likes

I tend to agree with Adam on this. A similar example is being able to change the RegEx engine that ColdFusion uses (from POSIX to Java). If I own all the things, it feels OK. But, if I have any 3rd-party libraries that use RegEx, then it might cause unexpected issues.

You know what might be cool?!?!? – being able to define settings like this on a per-CFC basis. Like, what if I had a base CFC like:

component
	displayName = "BaseCFC"
	cfml:localmode = "modern"
	cfml:regexEngine = "java"
	cfml:nullSupport = true
	{
	// ....
}

… then, I could just extend that CFC when I wanted to use those settings (and / or override them as well):

component
	extends = "BaseCFC"
	cfml:regexEngine = "posix"
	{
	// ....
}

Anyway, just thinking out loud here…

4 Likes