Hi Trygve,
Trygve Reenskaug escribió:
Juan, Many thanks for your open discussion. Hans-Martin has given well-founded comments. There is a lot of solid experience in them that I recognize and that should be useful in your work.
:)
I would like to add two comments based on my own experience.
- I underestimated the geometric complexity of even a simple window -
until I drew ALL the relevant rectangles in a scrollable text editor. (I believe I have the report somewhere, but can't find it). There were the outer view rectangles outside and inside the border. Then the scrollbar with all its details. The text viewport outside and inside the border, and the text view itself. The problem was that every rectangle was handled and even named somewhere in the code. Hap-hazard naming lead to an abundance of synonyms and homonyms which made it hard to find and fix the many bugs. Much grief would have been avoided if naming had been taken seriously from the very start. The complexity of the ST80 code is partly caused by naming problems but mainly, I believe, by complexity inherent in the task.
Ok. Anyway, I'm not rewriting PluggableMorphs, at least not right now...
- An off-by-one error is very visible on the screen and very
irritating. We once used floats for certain coordinates. Accumulating errors caused problems even after we changed to double precision floats. On the other hand, I believe Display PostScript (and PS itself) uses float coordinates? If so, it could be worth while to look into how users of DPS protect against cumulating errors. (See http://en.wikipedia.org/wiki/Display_PostScript )
Well, Floats accumulate a lot less error than integers...
Cheers --Trygve
Cheers, Juan Vuletich