deosjr / whistle

6 stars 2 forks source link

Typecheck builtin functions #10

Open deosjr opened 1 year ago

deosjr commented 1 year ago

Main source of unexpected panics. Builtin functions only show the happy flow. Nothing prevents the user from calling funcs with wrong types or amount of args, and this will panic. Checking types and throwing errors will prevent this. See lisp/global.go for the default env and lisp/types.go for the types and typechecking methods.