Angelo Schneider wrote:

> P.S. no offence but I doubt that you can use standard c to factor out
> the
> differences between windows and Xlib e.g. without knowing them both.
> How do you abstract from something you do not know?
> You are right in your concept, of cource, but than you have to port to
> each new
> library and if that does not WORK?
> What is you benefit in factoring something out in the first prototype?


Phew.

Well, of course you can abstract the GUI code in C.  This
has been done in many projects before including bochs.  The
actually GUI in bochs sucks, but at least it is abstracted. :^)

Anyhow, one of the principals of abstraction, is that you
don't care how the particular implementation works.  Though,
with a performance sensitive project like FreeMWare, you
may arrange things appropriately, so you can maintain
abstraction with macros/function calls such that you can
retain performance.

The idea of prototyping is that you can rapidly hash out
the details of a GUI without worrying about all the issues
of implementation/abstraction.  Abstracting something properly
does take work, and rearranging code constantly to maintain
this abstraction, is a ton of work.  Thus it's best to
hash things out on a whiteboard, paper, or better yet a
Java program which you can actualy interface with, before
diving into the code.

Will we have to change things along the way?  Yep.  Will we
get it right the first time?  Probably not.  Will we better
off?  Certainly.

BTW, you can remove GUI from the argument, and it's still the
same.  Abstraction is abstraction.  You can tell who the hardcore
programmers are, by their approach.  They design with abstraction
in mind, where it counts.

-Kevin

Reply via email to