Am I correct in that CFML doesn't support import a...
# cfml-general
a
Am I correct in that CFML doesn't support import aliasing?
Copy code
import com.example.SomeThing as ExampleSomething
import me.adamcameron.SomeThing as AdamSomething
I just typed that in today assuming it would work, and was surprised when it didn't (this was on Lucee), and wondered whether I was getting it wrong. However can't find any docs, so suggests I was just imagining that I had done this before.
e
It does not. :-/
I remember someone explaining to me it was because the import tag did something different than the Java or PHP import statements, but I don’t remember the details and it was years ago.
👍 1
a
Yeah have def used in PHP. Probably misremembering that. I caught myself writing
var_dump
the other day 😉 Was surprised to find that Java dun't support it. But like Groovy / Scala / Kotlin do.
The comments on this S/O answer are... "interesting"... https://stackoverflow.com/a/32537545/894061. Lost of post-hoc rationalisation & apologetics if you ask me.