All of the things I listed are design decisions which I felt were good at the time but came back and bit me later for one reason or another.
The dot operator is quirky because it uses indexing, which makes it harder to overload than it needs to be. Also, I have later realized that having a compile-time index operator is pretty much superflous as the regular index operator could do the same job and free up the dot operator for something useful. (Like adding methods to strings and arrays.)
The -> falling back on [] is really the same story. While it's terribly handy to write x->foo when you mean x["foo"], it's not very handy when you want to add methods to mappings.
As for master->resolve(), well, at the time I thought it would be cool if it was possible to write your own master object and load objects from other sources or change how symbols are resolved. However, doing so would of course change the language and it wouldn't be "Pike" anymore, would it? Also, going through the master when doing object loading has caused all sorts of problems with canonical naming, object serialization and cyclic references in compilations. Go figure...
Then there are multisets, which are really sets, which are actually pretty much arrays. For some reason I felt that it was important that the and/or/add operators had a logical consistent behaviour when the same element was present more than once in a multiset. However, I have yet to hear of an example of when this is actually useful.
Last, but not least: Automap was very hotly debated, and everybody had their own idea of how it could/ought to work, or weather it was a good idea at all. In the end, I just gave up on the discussion and implemented my idea, even though I knew it had some flaws. I kind of like how it came out, but I know some people probably don't agree.
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2003-04-17 09:31: Subject: Pointers/lvalues
interesting.
for automap, I guess it's little benefit for too much implementation effort (?) multisets: not bad per se, just totally superfluous. But what's wrong with the dot "operator"?
/ rjb