What are the merits and demerits of the following two code snippets:
return n==0 ? 0 : n==1 ? 1 : fib(n-1) + fib(n-2);
and
if(n==0)
return 0;
if(n==1)
return 1;
return fib(n-1) + fib(n-2);
for calculating the nth letter in the Fibonacci sequence?
Which one would you favour and why?