(define (f1 x::String y::String) (x:concat y))
(define (f2) (f1 3 3))
;; /dev/tty:3:19: warning - type integer is incompatible with required type java.lang.String
;; /dev/tty:3:21: warning - type integer is incompatible with required type java.lang.String
;; /dev/tty:3:15: warning - cannot convert literal (of type gnu.math.IntNum) to Type java.lang.String
;; /dev/tty:3:15: warning - cannot convert literal (of type gnu.math.IntNum) to Type java.lang.String
Unfortunately it does not support fully static type checking nor generics, otherwise it would be my favorite scripting language hands down.As for type checking Elisp, Elsa[1] seems an interesting project and I hope it becomes a stable option. On the other hand I wonder if in future type checking could also come from gccemacs[2], since one of the "long-term improvements" may be "better compile time warning and errors relying on the propagation engine".
[1] https://github.com/emacs-elsa/Elsa [2] https://akrl.sdf.org/gccemacs.html
Edit: grammar.