Why impress library

Why to use Go (Golang) for GUI development

Any application with a graphical user interface (GUI) faces one significant technical challenge: it must respond instantly to a wide range of events (keyboard, mouse, etc.) while simultaneously performing resource-intensive tasks to carry out useful work. Therefore, asynchronous programming should be a first-class language feature for building GUI applications.

A second criterion is balancing the language's level of abstraction against the cost of those abstractions. The best option is a balance between them. In some cases, the code must have zero-cost abstractions. Go is not ideal for creating pixel-perfect 3D games or editing 4K video streams.

Go is suitable for a wide range of applications. For example, applications for working with text, spreadsheets, charts, and 2D diagrams. Especially applications in which the user can fully focus on their thoughts, without being interrupted by having to wait for a response from the interface.

The remaining technical requirements are well-suited to Go:

Should a graphical interface mirror the operating system's style?

It depends. Modern applications often feature their own custom graphic style. There are no dogmas.

The impress library does not contain any predefined widgets. The tile library does.

Immediate mode or retained mode

Impress follows the immediate mode pattern. This is the best choice when the application's main window is something unique, rather than a typical set of widgets.

Immediate mode is simpler for designing custom widgets from scratch, whereas retained mode serves as the primary pattern for composing predefined widgets.

An application created with a graphical interface requires only a single graphical style. The retained mode library features a complex API for customizing the style of predefined widgets, whereas the immediate mode library requires the application to render the window in whatever manner it chooses.

How reliable is the impress library?

Under the hood is the interface between the Go API and a small GTK application that implements the GUI API. The GTK library is the most reliable component. Impress is based on a minimalist API for rendering and event handling that invokes GTK methods. The codebase is small and readable.

No warranties.

Application testing is part of the application development process.