On Mon, 01 Dec 2008 21:50:11 +0000 Martin Friebe <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote: >[...] > Yes I agree, and said so before: If a rtl function is going to pass > on the data to the OS, and conversation is always needed, then no > overloading is needed. Use RTLString. > > If an function does not use the OS (e.g extract file-path or name) > then no internal conversion is needed. Therefore overloaded functions > would give benefit to some programmers. (to name one group: most > beginners, who have more than enough to worry about; and will be glad > if strings are kept simple to use ( a fixed known type, not a type > that looks somehow abstract, because you do not know its > implementation at the time you write your code) True. > >> [...] > >> Also it would be nice (so I do not know how) not to have to > >> duplicate code, in order to archive this. Something like generics, > >> maybe. > > > > The goal of RTLString is to avoid duplicate code in the RTL. > > > Yes I acknowledged that this would be a problem. And also RTLString > has the benefit, of allowing unicode fpc to be available far earlier > than it would otherwise. > > The question remains, could it then be extended/optimized? Maybe a > generic like template (for functions, instead of objects)? Which > needs to be written only once, and the will be specialized for each > string type? Yes. I wonder, how many are there that really need this? Can you estimate? Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel