Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Iif(lExp, .t., .f.)?
Message
De
23/01/2010 14:41:53
 
 
À
22/01/2010 15:31:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01445223
Message ID:
01445661
Vues:
76
>>>>That conclusion would be too far-fetched. ANY programmer knows what logical expressions are, EVEN the beginner.
>>>>
>>>>>It reads, "I've no clue what logical expressions are".
>>>>>"IF THIS VALUE IS FALSE" would be
>>>>>
>>>>>IF NOT THIS.VALUE
>>>>>
>>>>>>Example:
IF THIS.VALUE = .F.
reads as IF THIS VALUE IS FALSE.
>>>
>>>All of these are just such minor points related to personal preferences that I don't know why we're even discussing it instead of something more complex / important.
>>
>>I think there are no longer any classes for beginners. :-)
>>
>>But if there were and I'd be the teacher, I'd pay attention to aspects such as this one. Wouldn't you?
>
>Actually, No.
>
>Maybe it's just me but.......
>This issue is for purists only and doesn't deserve any attention in a beginner class.
>
>When I read the comments about how the code is "harder to maintain" and "less readable" I'm scratching my head wondering how??? Does anybody here seriously have a problem figuring out what
>IF this.value = .T.
means?
>
>Readability is in the eye of the beholder. Considering the frequency of this construct, there must be a lot of "somebodies" who think this is more readable. They're not all "bad" programmers. They just got into the habit of looking at something in a certain way and figured it's not worth the effort to change.
>
>We don't measure programmer productivity by the keystroke anymore.
>I can't imagine code performance being impacted in any meaningful way.
>
>So, other than some annoyance, what's the big deal?

It's not that I find the code that hard to maintain, but it does put me on guard that the original author may have lacked some deep understanding of aspects of the language. Maybe that's not really true, and it's just stylistic, but my experience has been that when I see code like that (say, in forums) and point out that it's overkill, people don't seem to have known that.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform