I certainly think such a lib can be safe but most importantly most programmers never touch this and worst case if its horrid or unsafe this is no big deal ( Yes such code will require more maintenance but it may be a trade of your willing to pay and if you don't optimize prematurely the amount should be small! ) . What is most important is that strings are simple , light weight and encourage good behavior , removing indexing that returns a char with a find returning a string is a good example it pushes programmers where they should be ( try to use a string but if you do want lots of indexing use an array) and it makes multi lingual programming easier
And as you stated with cstring will also need a mutable string builder to build strings in .NET this is critical for quite a few cases. >The point of all this, I suppose, is to illustrate that Ben really is correct, and that the preferred idioms in the two cases really are quite different. It bears thinking about, mainly because of the conversion issues. Horses for courses . You also stated not to make string do too much.. If strings are equal to C# and Java in performance (they should be slightly better as they will be mainly ASCII) as easy to use AND you can grab a mutable array which will be competitive to C than you have a good and simple solution. After using .NET for 10 years the libs have a few holes (mainly round win32) but the lib subtlety does a great job at making bad programmers adequate or even good ( I see less bugs and issues than say C++ with experienced guys) . Considering most guys are 9-5 and have little interest outside their job this is a good thing. Ben
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
