lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>> j@jmawebb.cjb.net 07/07/04 12:53PM >>>
>In this vein though, it would still be nice if one could write in Lua
>something like:

>function foobar(String x, MyClass y) ... end

>Where String and MyClass are predicates aginst which the arguments
can
>be checked, if enabled by an interpreter flag.

Ah, but then how is that different in practice from:

 function foobar(x,y)
    assert(String(x))
    assert(MyClass(y))
    ...
end

where I've defined suitable predicate functions?

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.