
On Friday 20 May 2005 19:18, Andre Merzky wrote:
Q: Why does the package NameSpace need a interface NSDir? Shouldn't that be named Directory?
A: It WAS named directore before, but we thought Dir to be, well, shorter, w/o loosing meaning. Hmm, I prefer Dir for beeing shorter, but have no strong opniion about it. Others? NS is redundant and the meaning of Directory is more obvious than Dir.
- Irgendwie sind die Flags merkwürdig. Ich könnte ein Flags-Array mit Create und NoCreate erzeugen. Es würde dann zwar ein Exception geworfen, aber sowas kann auch der Compiler überprüfen. Lass doch die NoXXXX Flags weg und mach flags zu einem set<openFlags>. Dann gibt es auch keine doppelten Flags. Und wenn ihr schon numerische Werte für die Flags einführt, gestalte sie doch so, dass man auch ein einen Integer und Bit-Arithmetik in einem Binding verwenden kann. enum openFlags{ Create = 1, Excl = 2, Truncate = 4, Append = 8, Lock = 16 };
Q: Flags are strange: I could create a flagg array with both 'Create' and 'NoCreate'. Well, thats would give an exception, but thats something which could be catched by the compiler. You could leave out the NoXXX flags, and change the flags to set<openFlags>. the there are no double flags. And if you go for numeric values, you could do the usual bit arithmetik thingie...
A: I agree. I can't for sure remember the rationale for the current notation -- but I think we left that to the language binding. So, in C we would do what you suggest. Actually, you can't do the bit thingie in C. If you specify numerical values for the different flags, all bindings have to follow this specification.
Q: Interface Attributes: strange name, isn't that rather a description or such? removeAttribute is not fleshed out. You can't have multiple values for one key - a pity.
A: Hmm, maybe we didn't transport the idea well enough. Think physical files: attributes would be for example: file size, file type, last mod time, owner, ACL etc. You don't have two values for size. If you have more than one item to one key (acl), you have vector attributes for these. Ok, my fault. You can have multiple values for one key using the xxxVectorAttribute-Calls.
Regarding the name of the interface: I associate with "Attribute" one Key-Value-Pair but your interface represents a set of attributes. Thatswhy I think that the name is strange. Thorsten