Vincent Hennebert wrote:

Hi all,

I'd like to have the opinion from the team about how I should proceed.
I'm currently at a point where I think I know enough, both from
theoretical and code points of vue, to start the implementation of
floats. By mimicing the handling of footnotes, I think I can have a
working implementation rather quickly and easily. However, it wouldn't
be very satisfying IMO. Some refactoring wouldn't be useless, and while
I'm at it, why not doing it completely?

Sounds reasonable so far.


I've already spent much time figuring out how the code is working. From
what I've seen, some areas of the code still look experimental. I think
the implementation of floats may be an opportunity to bring it to a more
"polished" level. A refactoring would have several benefits:
- this may help sorting things out, and even prepare the implementation
  of a first-fit algorithm (although this might be a bit too much
  unrelated, I'm afraid)

Jeremias mentioned the idea of different XSL-FO features requiring different implementations of the Knuth algorithm, specifically first-fit and total-fit. I get the impression though that they are usually mutually exclusive and we cannot have one bit of the code using first fit and another using total-fit.

- this may help future contributors to easier understand this area of
  the code and get involved more quickly

Always a good thing.

- this is always better to have a clean design. Moreover, I think this
  is possible to make the implementation even more object-oriented,
  which would help sharing code between the line and page levels.

This has always been a concern of mine. Although as I understand it there are some differences between the two.

- a refactoring process is more efficient and secure if one has the
  opportunity to think full-time about it...

I quite agree. If only I was a student again :)


That's why I would propose to refactor the breaking algorithm. However,
to do things properly I would need to understand a bit more of the code
than just the breaking stuff. This may take some time, especially if I
want to make sure that I don't introduce new errors. The implementation
of side-floats may suffer from that. That was not the original intent of
the SoC project, but I think this would be a benefit for Fop.

WDYT?

I think you need Jeremias's input here before proceeding further. He's going to be offline for about 10 days I think.

Chris


Reply via email to