Suggested Extension to Euphoria language
- Posted by Robert Craig <robert_craig at COMPUSERVE.COM> Feb 26, 1997
- 863 views
Thanks to Jeff Zeitlin for his suggestion. I've received many suggestions for defining what it would mean to subscript a sequence with a sequence: 1. Jeff's idea (it's done like this in APL): s[{a,b,c}] is {s[a],s[b],s[c]} 2. Someone else suggested (useful for tree structures of unknown depth): s[{a,b,c}] is s[a][b][c] 3. Someone else suggested (the database people would like it): s["Fred"] is the Euphoria object associated with "Fred" e.g. s["Fred"] = 99 s["Dave"] = 27 s["George"] = {1,2,3} Euphoria would try to look up "Fred" in s in some efficient way (linear search, hashing, whatever). If "Fred" couldn't be found it might fail, or perhaps return some special value (what value?). So far I haven't been convinced that any of the above are really worth it, since you can achieve the same effect fairly easily using the existing language. Plus the fact there are at least three choices makes it difficult to confidently commit to one of them. The main reason is I don't want to make the language more complicated without good reason. Regards, Rob Craig Rapid Deployment Software