Create a Compiler-Independent Implementation of Ada GUI

Dear Ada Awards Committee and community,

I would like to propose a project to create a compiler-independent implementation of Ada GUI. I do not want to be the person who takes on this task.

What is Ada GUI?

Ada_GUI is a specification for a GUI that makes use of Ada’s strengths, particularly concurrency. Traditionally, GUIs have been implemented by the client registering callback operations, then giving up its thread of control to the GUI. This is a hack to address the inherent parallelism of a GUI in sequential languages. It results in code that is unnecessarily difficult to understand.

In a concurrent language like Ada, a better design for a GUI is for the GUI to have its own task, so it doesn’t require that its client give up a thread of control. GUI events are communicated to the client through a protected queue of events. The client software can be written in the clearest way possible, unconstrained by the GUI.

There is a sample implementation of Ada GUI derived from Gnoga. While it is platform independent, it is GNAT dependent.

The task

The task is to create a portable implementation of Ada GUI that should compile and work with all Ada-12 compilers (currently there are two such compilers: GNAT and ObjectAda). This implementation could be

  • A modification of the sample implementation that removes its dependence on GNAT, or
  • An implementation based on another GUI, such as GTK or QT, or directly on OS GUI features

(or both could be undertaken as separate tasks). While a platform-independent implementation would be a good thing, it is not a requirement of this task.

Why should this idea be considered?

Ease of understanding is one of the most important features of good software. GUI programs are usually more difficult to understand than they should be. Ada GUI exists to promote GUI programs that are as easy to understand as possible. However, some people dislike the use of a browser by the sample implementation; it would be good if they could also create easy-to-understand GUI programs with an alternative implementation.

Ada is the best language for creating correct software. Minimizing reliance on components written in other languages helps improve the reliability of Ada software. Most GUIs are implemented in some of the most error-prone languages there are. Ada GUI’s sample implementation is all Ada, though its effect relies on a browser. Alternative implementations might need to include foreign components. However, an Ada-GUI implementation is likely to be more Ada than simply using a binding to a foreign GUI library, and so more robust.

More robust and easy-to-understand GUI programs in Ada seems like a worthwhile objective.

Disclaimer

As I am part of the committee, I will not take part on voting for this project idea.

Best regards,
Jeff

3 Likes

6 posts were split to a new topic: Discussions about GUI design in Ada