[Swift-devel] Procedure re-defintion, feature or bug ?
Yadu Nand
yadudoc1729 at gmail.com
Wed Aug 10 00:56:35 CDT 2011
Hi,
Following what Justin said about function redefinition being a
feature in the shell I tried a test to check if that really works in
swift.
(int o) f (int i){
o = i ;
}
trace ( "first" , f(5) );
(int z) f (int a){
z = a * 10;
}
trace ( "second", f(5) );
In swift this would give :
second, 50
first , 50
What I think is, the procedures are overwritten around compile
time which allows this behavior, in which only the last definition
is valid by execution time.
--
Thanks and Regards,
Yadu Nand B
More information about the Swift-devel
mailing list