In a proc returning T, if the result variable is never used and if the body 
contains no return statement, the compiler should warn the user It may sound 
silly, but it could help users debug some logic errors. an int proc silently 
returning 0 could make an erroneous code harder to debug. I think the compiler 
should generate a warning at least in the debug builds to notify the user that 
"proc name[T, U](arg: T): U returning U has no return statement and never 
modifies the result variable, it will always return default U". I just wanted 
to see the community's reaction to my proposal instead of opening an issue 
straight away. 

Reply via email to