Comment by rybosome
12 years ago
I could write a library in Scala that allows almost this exact syntax. Say...
val fooConfig = "config" ^ "foo"
Of course, there would be some config required. There are various ways to handle that, but it could be as minimal as a single line of code. I don't want to be critical of your work, but my own preference is for languages which are DSL-friendly. Although there are some disadvantages (possible lack of fluidity, mildly more verbose), I feel the advantages (lack of vendor lock in, composable with the rest of the language) are worth the trade-off.
Admittedly I've never had experience with MUMPS, but I have used PHP. Until pretty recently, that was a language which attempted to break down the barriers between its syntax and the runtime environment at the expense of the language. Reams have been written on the PHP argument, and I won't contribute further here; just noting that my preference for languages with a flexible syntax and a "do it in a library" attitude is based on having experience with the opposite.
Have you had experience with any of the embeddable-DSL languages (Ruby, Clojure, Scala, Haskell)?
With the new string interpolation syntax you could define config"key": Option{Result] and even config"base/userdata/$user/$key": Option[Result].