3 ms·
I find type information for functions incredibly useful. I get so lost in Python code once it get past a certain size even after years of Python programming exp
by newen 6y ago
I find type information for functions incredibly useful. I get so lost in Python code once it get past a certain size even after years of Python programming experience because of the its lack of ability to put a useful amount of structure into the code. After having programmed in Haskell for a while, I just miss tabbing a function and being able to see its type signature.
- dleslie 6y agoThat, and more, is available in common lisp. * (describe #'+) #<FUNCTION +> [compiled function] Lambda-list: (&REST SB-KERNEL::NUMBERS) Declared type: (FUNCTION (&REST NUMBER) (VALUES NUMBER &OPTIONAL)) Derived type: (FUNCTION (&REST T) (VALUES NUMBER &OPTIONAL)) Documentation: Return the sum of its arguments. With no args, returns 0. Known attributes: foldable, flushable, unsafely-flushable, movable, commutative Source file: SYS:SRC;CODE;NUMBERS.LISP Docstrings and type information can (optionally, but recommended) be added to all code. Users of your API can use documentation/describe to discover information about it without ever having to look at the implementation.