Something along those lines is good (and necessary, for
overloading) but it doesn't entirely tickle my fancy in terms
of syntax... it looks too much like the natural syntax for
constructors.
How about this then:
function foobar(x,y) ; String(x); MyClass(y);
...
end
Looks just like old-fashioned K&R C ;)
These functions of course contain the assert as Daniel has
them; it could be possible to generate them automatically
from their underlying types.
There's always the _documentation_ aspect of parameter
types, of course, as Ivan points out. I remember getting
confused looking at Python code, wondering what the hell
was _supposed_ to be passed to a function.
steve d.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.