[fpc-pascal] FPImage and GetDataLineStart

Marco van de Voort marcov at stack.nl
Fri Apr 22 09:06:05 CEST 2011


In our previous episode, Michael Van Canneyt said:
> >
> > However when implemented using generics you can also directly use the
> > specialized type, and have fairly quick direct access.
> 
> You don't need generics for that. Any form of an array of bytes will do, 
> since that's what it amounts to in the end anyway.

But it has to figure out runtime which to use, or you need to duplicate a
class for each storage type and deal with delegation overhead.

I've complete understanding for the fact that generics are too early, but
IMHO it is the long term solution. Anything else would be madness, or minor
damage control at best.
 
> >> The thing will be to parametrize the needed storage formats, and then implement
> >> the reader support for them.
> >
> > How will you implement reader support for many memory layouts?
> 
> I am not that definite in my design. But I'm willing to listen to ideas.
> (barring the ones relying on the use of generics)

Last night, we started a fund raiser on IRC to buy you a more recent Delphi
version :_-)



More information about the fpc-pascal mailing list