[fpc-pascal] Challenge accepted

Joost van der Sluis joost at cnoc.nl
Sat Aug 10 17:30:27 CEST 2019


Hi all,

Few months ago I read somewhere on the fpc-mailinglists that someone 
stated that FPC is fine, but it could use more additional stuff.

I really searched, but I can not find the original mail anymore. But I 
want to accept that challenge.

One of the thinks I think the Pascal-world is still missing is a good 
streaming library. Or, in fact I mean more something for 
(de-)serializing objects.

Normally I just start coding on such a project, but maybe we can make it 
more of a group-project.

First of all, we have to get some functional specifications. Let me start:

At least it should be able to:
- stream to XML, Json and binary formats
- Selecting the format should be done by some sort of dependency-injection
- It should be possible to omit fields based on the whole class, but 
also based on a single instance of the class
- It should be possible to stream to/from *all* classes
- Classes can modify how they are streamed by implementing some 
interfaces. (Maybe later also based on attributes)
- It should also be possible to let the 'outer world' decide how a class 
should be streamed.
- It must be possible to change how properties are 'formatted'

I can go on, but these are the most important I can think of now.

At the moment I'm thinking about a design in which there is some class 
which defines how the class has to be mapped to the stream. Then this 
'map' and the instance of the class are given to some other class that 
does the streaming, using the right (injected) stream-format.

Normally I would submit such code to fpcprojects (svn) but maybe Michael 
can help setting up a git-repository in the new fpc git-environment we 
are currently testing with?

And who else wanna help?

Regards.

Joost.




More information about the fpc-pascal mailing list