On Thu, May 31, 2007 at 11:44:06AM +0200, Abdelrazak Younes wrote:
> Stefan Schimanski wrote:
> >Hi!
> >
> >Can anybody please explain me Text::bidi? It keeps a cache of RTL<->LTR 
> >levels for a row. But this variable is in the Text class, in the public 
> >section. It does not store for which paragraph or row it has values. It 
> >is accessed from all over the LyX code. At some few places it is updated 
> >to another row (e.g. in the RowPainter). There is zero documentation for 
> >it in the Text class declaration. Its computation function is 3 screens 
> >long with a lot of position magic going on, but without any (zero, 
> >niente, none) line of documentation. If you want to learn what bad code 
> >is, you will have a lot learning material here.
> >
> >What I want to say with this example: the bidi code is in a very bad 
> >state. We are lucky that it is more or less working.
> 
> So is a lot of other part of the code. The situation has improved a lot 
> though in the 1.5 development frame. I was told that it has improved a 
> lot in the 1.4 frame too. I cannot imagine how it was in the 1.3 frame.

Better than in 1.2. And before that there was old mathed, and before
that there were manually linked paragraph lists with paragraphs from
tables and footnotes sprinkled it...

The main problem is that new features (aka "multiple views") crop up
faster than the core can provided the necessary infrastructure, leading
to a mess of 'fixes' just to make it work. The the feature's developer
leaves, nobody understands the code anymore and why a particular 'fix'
was needed and what a real solution might look like.

Bidi is one example, then there is was change tracking in zombie state.
Tables became a mess over time. 'bondary' certainly is.

And of course there is a reason why the core doesn't catch up: Core
developers have a tendency to try out Ivory Tower style features without
looking at the cost/benefit ratio. [I might be guilty here, btw, too.]

Andre'

Reply via email to