Question
· 10 hr ago

Are package names case sensitive?

The documentation at https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...

Case-sensitive: variable names (other than the system variables) are case-sensitive. Names of classes and their members, names of routines and their entry points, names of include files and macros are all case sensitive.

Consider "fully qualified" class name: Package.subpackage.ClassName

What is the class name mentioned in the documentation? Package.subpackage.ClassName  or ClassName ?

It's unclear to me if in InterSystems/ObjectScript parlance class name includes also the packages or not.

In the other (non-related as my example has no SQL/%Persistent involved) documentation at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Schema and table names are not case-sensitive; package and class names are case-sensitive.

But if I try to have both Package.subpackage.ClassName  and package.subpackage.ClassName I'll get:

ERROR #5092: Name conflict on class 'package.subpackage.ClassName' because class 'Package.subpackage.ClassName' has the same name but differs in case.

Or trying to have both Package.subpackage.ClassName and package.subpackage.ClassNameTwo gives me:

ERROR #5093: Name conflict on class 'package.subpackage.ClassNameTwo' because package 'Package' has the same name but differs in case.

So it looks to me the package names are case in-sensitive. To me this is an inaccuracy/bug in the documentation and I'll report that if no-one else objects :)

This is related to "IPM modularization"-effort where I'm trying to apply de-facto naming conventions but the package name case in-sensitivity prevents us to mix the new IPM code with old code (mapped from other namespaces).

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.1.2 (Build 574_0_22161U) Tue Jan 24 2023 11:05:57 EST
Discussion (3)1
Log in or sign up to continue