Menu

#4 Default value and empty key for autoloadable maps

open
nobody
None
5
2004-09-08
2004-09-08
No

Currently in an autoloadable map, you cannot specify
either a default value, or an entry with a empty string as
a key without writing an albeit small amount of millscript.

Would it be desirable, or even sensible, to add support
for the following two files in an autoloadable map
directory:

i) A file matching ".[ms|tp|sk|prop|xml|txt|line|lines|map|csv|
vsv|tab]" is loaded as an entry in the map with the empty
string as its key. This is consistent with other entries in
an autoloadable map, as all keys are Strings.

ii) A file matching ".default.[ms|tp|sk|prop|xml|txt|line|lines|
map|csv|vsv|tab]" is loaded as the default value for the
autoloaded map.

There are problems that arise from this, in that an
autoloaded file is expected to define a variable with the
name of that file. In the case of the empty string, it isn't
possible to declare such a variable, so you can't have a
file called ".ms" in an autoloadable map. I think there
might be some abiguity about what a "*.ms" file in an
autoloadable map means.

Discussion


Log in to post a comment.