Re: [Hampshire] Code style

Pàgina inicial

Reply to this message
Autor: Vic
Data: 2009-06-08 10:01 -000
A: hampshire
Assumpte: Re: [Hampshire] Code style

> So in perl one could boil the whole thing down to
> my $result = ($fast_path_applicable?) $fast_path() : $slow_path() ;
> return $result;


You can do the same in C - what comes out of the compiler is identical to
the simple "if" idiom I used earlier. So - for clarity - I'd still go for
that one...

Vic.