this post was submitted on 27 Nov 2023
1 points (100.0% liked)

Lisp

53 readers
3 users here now

founded 1 year ago
MODERATORS
 

I would appreciate it if you could teach me about type inference in Lisp. Type Inference in Lisp. Weaknesses of Dynamically Typed… | by Kenichi Sasagawa | Oct, 2023 | Medium

you are viewing a single comment's thread
view the rest of the comments
[–] theangeryemacsshibe@alien.top 1 points 1 year ago (1 children)

In statically typed languages, you would have to predefine the output type. Such a function as bar couldn't be written.

Make a better type system - number -> (nil | number) should do the trick to type bar. SBCL can infer that one.

[–] sym_num@alien.top 1 points 1 year ago