Author: William Casarin 2018-07-03 11:54:37
Published on: 2018-07-03T11:54:37+00:00
In Haskell libraries, it is customary to prefix functions that may have side effects with the word "unsafe". This practice is intended to warn users of potential dangers associated with the use of these functions. However, a proposal has been made to use a postfix instead of a prefix to indicate the unsafe nature of these functions. The suggested postfix options are "_VULNERABLE" or "_UNSAFE". This proposal aims to make the usage of unsafe functions more intuitive and easier to understand. While the current naming convention is effective in warning users of the potential risks involved, some developers find the prefix format to be awkward and difficult to read. By using a postfix instead, it is hoped that the naming convention will become more consistent and user-friendly.It is important to note that the proposed postfix options are not yet universally accepted in the Haskell community, and there are likely to be differing opinions on the matter. It remains to be seen whether this suggestion will be adopted as a standard convention for indicating unsafe functions in Haskell libraries. Nonetheless, the proposal represents an effort to improve the clarity and usability of the language's conventions.
Updated on: 2023-05-25T00:25:02.435733+00:00