In the Cadence SKILL (proprietary EDA language, based on LISP & SCHEME), one can define the argument types in a procedure.
It will error out if the wrong type of argument is given. See shell report below:
procedure( foo( ko "t" ) printf( "Hey %s\n" ko ) )
>foo
>foo("1")
>Hey 1
>t
foo(1)
>*Error* foo: argument #1 should be a string (type template = "t") - 1
Is there something as nifty as that in Ruby? That is, in the method interface definition, not the body, the type checking is done?
Thanks.