Dear all,
I would like to elaborate on a number of things that have been said
recently about Object I/O (be it in Clean or Haskell). Object I/O has
been designed to be platform independent: it is separated into two
layers: one OS dependent layer and one abstract Clean/Haskell layer built
on the lower layer. The OS dependent layer has been implemented for the
MS Windows platform and we are currently working on a Mac port. Krasimir
Angelov has tried to port it to GTK, and says that the OS dependent layer
apparantly still has an OS bias that makes it less suitable for GTK. He
mentions the following differences:
[Krasimir Angelov at: 02:21 20-1-03 -0800]
* The GTK cannot draw rotated text and rotated
elipses. This depend on restrictions imposed from X
server.
* The Win32 backed lack powerful text formating
features like these given from PANGO.
* The Font families given in the GTK and Win32 are
rather different. The font management are still
similar on each platform.
Dialogs in Windows are specified in dialog units, i.e. they scale with theThis has partially been answered by Krasimir. In addition, I would say that the answer to these differences is abstraction. As an example, consider resizing of controls. In Object I/O, a control can have a resize attribute that defines its size in terms of the size of (one of) its parent(s). When put in a resizeable parent object that is resized, it will resize according to its attribute. If the platform does not allow resizeable dialogs/windows, then that is no problem. Similar to icons in buttons: add an attribute to specify the icon in a button and if the platform does not support it, you don't show it. No scrapping needed; good set of attributes and semantics needed.
font size but cannot be resized by the user: scrap Gtk's dynamic sizing
capability. Buttons on Aqua cannot have icons in them, scrap icons in Gtk
and Windows button. Scrap Aquas hierarchical view in several columns
(could be simulated if Windows supports adding columns on the fly, Gtk
would), scrap additional columns next to a hierarchical tree since Windows
doesn't support that. Scrap Window's concept of groups in dialog and
keyboard accelerators in general since Aqua doesn't know about hotkeys.
AFAIK a lot of UI elements on Windows which are considered "standard" are
implemented in the Microsoft Foundation Classes. Thus to actually use
these, one has to use the MFC written in C++ (or .net).
While programming at the IO level works, it does not give oneI don't agree with the "does not give one much of an advantage versus programming in C". Many proposals have been written that make use of the elaborate type system of functional languages to glue correct GUI programs; many approaches use functional language features do construct well-typed and well-structured Domain Specific Languages.
much of an advantage versus programming in C, in sharp contrast
to most other Haskell programming.
The diversity of high level solutions which differ totally in
outlook ("express the widget as a datastructure" versus
"everything is a composition of functions") gives the impression
that the library designers never used their toolkits in larger
applications which would have made any rough edges painfully obvious.
It seems therefore that a lot more work needs to go into this field
before we know what a good high level Functional GUI toolkit looks like.
Contrast this with more mature fields such as pretty printing,
parsing, etc where there are many solutions all following the same
ideas.