Next: , Previous: Whirlwind Tour, Up: Introduction to Guile

2.4 Discouraged and Deprecated

From time to time functions and other features of Guile become obsolete. Guile has some mechanisms in place that can help you cope with this.

Guile has two levels of obsoleteness: things can be deprecated, meaning that their use is considered harmful and should be avoided, even in old code; or they can be merely discouraged, meaning that they are fine in and of themselves, but that there are better alternatives that should be used in new code.

When you use a feature that is deprecated, you will likely get a warning message at run-time. Also, deprecated features are not ready for production use: they might be very slow. When something is merely discouraged, it performs normally and you wont get any messages at run-time.

The primary source for information about just what things are discouraged or deprecated in a given release is the file NEWS. That file also documents what you should use instead of the obsoleted things.

The file README contains instructions on how to control the inclusion or removal of the deprecated and/or discouraged features from the public API of Guile, and how to control the warning messages for deprecated features.

The idea behind those mechanisms is that normally all deprecated and discouraged features are available, but that you can omit them on purpose to check whether your code still relies on them.