|
From: Michael C. <cum...@gm...> - 2006-08-24 10:56:26
|
Why the restriction on having the has start with a letter? We are not creating a c# variable, also special characters should be ok as well. This is a value that is ( read should be ) only used internally in the engine ( since it's autogenerated. ) Anyone needing the key value for persistance would want to have their own naming scheme and not rely on the engine to create a key for them. ( For things like the DotScene format, or any other custom scene format ). As for generating a hash, key.GetHashCode() should suffice. On 8/23/06, Andreas Bednarek <an...@se...> wrote: > > > > > I guess my main issues at this point are: > > > 1) Some one can inadvertantly use the same naming scheme as is proposed, > > > in fact I can see many an exporter using this exact naming scheme. > > So you mean that the while loop could currently make many iterations until > a key is found? Yeah, right. > > > How about we use a hash of the final key value and prepend that to > the type name? > Something like that sounds like a good idea, just: > - How will you be creating the hash value? When using some .NET Framework > class, if Mono supports it... > - Will you be able to create a string representation that doesn't contain > any special chars like ' ? / =' etc. and possibly not start with a digit? > - May the collection change rapidly at runtime, so it would eventually > break performance? (Except cases the hash adds to performance) > > But I'm no expert on hashing. > > Maybe just make some fast thing like converting the uint counter to a four > or maybe six chars Hex string (less signif. bytes shown) ? Ensure starting > with letter by prepending a hardcoded '_' or whatever. I.e. not using the > whole string key for hashing... > > > 2) rename NextKey to GetNextKey, NextKey sounds like a property, > GetNextKey is a definite action. > > True. > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > axiomengine-developers mailing list > axi...@li... > https://lists.sourceforge.net/lists/listinfo/axiomengine-developers > > > |