Am 2012-07-04 10:22, schrieb Marco van de Voort:
>> Safest method is not to use the generic type "string" in your code.
>> Instead use directly the string type that you need (i.e. "ansistring" or 
"unicodestring").

> I wouldn't do that. That makes later migration unnecessary involved.

I find it quite naive to believe that a "later migration" (to what?) can be 
achieved by simply changing the string type. In general, the code needs changes too when 
doing that. And therefore it would be a good idea to force oneself to have a look at the 
code by having to change the type definitions.



> Just define an alias and use that everywhere.

Of course, that's the best way. But this is a different topic. The alias can also point to 
"string" again which does not help very much. So the alias should be for a fixed type 
like ansisting or unicodestring but not for "string".

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to