4 ms·
A better example for duck typing would be something like: var my_func(var int_or_string, var int_or_obj) { ... return int_or_string_result; } Simplifi
by JackdawX 13y ago
A better example for duck typing would be something like:
var my_func(var int_or_string, var int_or_obj) {
...
return int_or_string_result;
}
Simplifies certain operations, complicates debugging. Great for small scripts though.