It's handy for introspection purposes (REPL use, logs, etc.)

Can you explain how?

If you work side by side with a high-level and a low-level language, e.g. by writing FFI code or using an existing FFI wrapper. It's rare that a wrapper fully hides a low-level feature. And documentation, logs, and debuggers often state the numeric codes.

Note that the SRFI does not only cover errno, but all kinds of other codes:

- "Process exited with signal 6" -> look up which signal.

- C libraries that have hardware independent codes.

- Numeric network protocol codes (e.g. HTTP and IRC).

- Hardware codes, especially on embedded systems.

If you work with this stuff in Scheme, the REPL should let you look things up.

    C and Python programmers can easily find the integer corresponding to a
    given errno symbol on the local machine. Have they been abusing this
    capability?

I don't see how anyone could possibly know the answer to that question.

I meant that as in "lots of language implementations offer this feature by a simple name that does not explicitly say it's machine dependent, and you don't see anybody complaining".

Reply via email to