Library design

From Liberty Eiffel Wiki
Revision as of 23:27, 21 December 2021 by Hzwakenberg (talk | contribs) (spelling)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Library Design

The design depends on the library. (TODO: add a section for each library).


The library is developed using a few principles.

Memory conservation

If a user does not use the GC, then they should be able to keep the memory footprint under control.

Of course, if one uses the GC, the library should not keep too many objects around just for reuse.

The general solutions are:

  • if a library function returns a STRING, always return the same -- and/or provide a function that appends into a user-supplied STRING (kinda append_in)


The master word is: no magic. The code should be crystal clear. All that can be written in Eiffel is, and when low-level is needed that should be clearly written in the code.

In other words, the library basic bricks rely on externals. There are two kinds of externals used in the library: built_in and plug_in.

external "built_in"

Those are rare. They involve compiler-specific code.

external "plug_in"

Those are the most frequent and are less compiler-involved. They use the general-purpose plugins mechanism.