Discussion: strtok question
Afficher un message
Vieux 01/06/2008, 14h44   #7
Richard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: strtok question

Antoninus Twink <nospam@nospam.invalid> writes:

> On 31 May 2008 at 23:37, Ben Bacarisse wrote:
>> CBFalconer <cbfalconer@yahoo.com> writes:
>><snip>
>>> while (*src && (tknchar != *src)) {

>><snip body>
>>> }
>>> if (*src && (tknchar == *src)) src++;

>>
>> Some people might find that test confusing. It is certainly
>> belt-and-braces code.

>
> Most people grow out of this sort of thing within a few months or so of
> their initial child-like excitement at discovering a language with so
> many side effects. Clarity and ease of debugging become more valuable
> than a transient smug feeling of cleverness.


I have to agree 100% with this statement. Some people seem to take
pleasure in obfuscating their code.

>
> Actually I'm pretty tolerant of different people's ways of laying out
> code, indenting and the rest, but CBF really does seem to have total
> anti-taste when it comes to code formatting. Perhaps the most irritating
> thing of all is
>
>>> } /* tknsplit */

>
> This seems to me to be about as ful as the infamous
>
> i++; /* increment i by one */


Again agreed.


  Réponse avec citation
 
Page generated in 0,05823 seconds with 9 queries