> > > > >> 3.What about cases where the length is not known at compile time .. >> > > Then you can't use a FIxedString. >
This is the size issue i was talking about .. its a huge issue eg if you go faststr mystr = userinputstr.Trim(); or some loops I dont know in the CLR if var size at end works for heap types ( I doubt it ) because mono has a nasty mechanism for creating strings which would not be needed if the CLR itself needed to do this .. You could patch mono and for the CLR , maybe you possibly could use CoTaskMemAlloc and CoTaskAllocFree ( which calls GlobalAlloc(GMEM_FIXED)) The other possability as David mentioned is since most strings are small have types for 1-256 and then use a list like mechanism for larger strings and change the type if needbe.. ( not just for strings but any such variable sized embedded structure) but requires some sort of dynamic size to type lookup at runtime, .. > > >> 4. The same would for NAT types ? it ). >> > > Umm. Not sure what the question was here... > Just that there would be many NAT types if you have a NAT kind . Ben
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
