Re: "0= if" or simply "if" ???
- From: Jerry Avins <jya@xxxxxxxx>
- Date: Fri, 23 Mar 2007 20:47:57 -0400
Cesar Rabak wrote:
Jerry Avins escreveu:Cesar Rabak wrote:Jerry, I respect we differ.Jerry Avins escreveu:
[snipped]>
I think it's a beginner hangup to write "if x .ne. 0" in BASIC, C, orI think is a good practice that begginers are forced to abandon due
Fortran instead of "if x". They mean the same thing and should be
seen that way. Same for Forth.
'experts' calling it "hangup" until they need to code in a professional environment and have to 're-learn' to write code that is more readable (== maintainable).
Obviously we differ. To me it is easier to maintain "If X" than "If X exists" simply because it clearly means the same thing and uses fewer words. When I need to understand code you write your way, I will suffer through it in silence.
The advantage I agree with people that propose the way you call 'mine' is that it makes better to non Forthers to read the code and the intention clear enough.
Adopting locutions tin Forth to make it more transparent to those accustomed to other languages makes no more sense to me that adopting locutions in English for the same reason. Even if it did make sense, it wouldn't apply. The "x if" in Forth means exactly what "if x" does in C or BASIC. The result can steer a branch in those languages too.
Also I would like to point you changed (I surmise accidentally) the semantics of the example from above to your last post.
The first post discuss the issue of comparing some variable to zero explicitly or implicitly (or it is against false implicitly or explicitly), versus existance or not of some 'thing' called X, whichever meaning would 'exists' have in your programm.
I think that in your last post the readability is opaque in both cases and would need elicitation by any person not familiar with the implementation.
Sorry. I was trying to write English.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
.
- Follow-Ups:
- Re: "0= if" or simply "if" ???
- From: Cesar Rabak
- Re: "0= if" or simply "if" ???
- References:
- "0= if" or simply "if" ???
- From: Duke Normandin
- Re: "0= if" or simply "if" ???
- From: Jerry Avins
- Re: "0= if" or simply "if" ???
- From: Cesar Rabak
- Re: "0= if" or simply "if" ???
- From: Jerry Avins
- Re: "0= if" or simply "if" ???
- From: Cesar Rabak
- "0= if" or simply "if" ???
- Prev by Date: Re: "0= if" or simply "if" ???
- Next by Date: Re: "0= if" or simply "if" ???
- Previous by thread: Re: "0= if" or simply "if" ???
- Next by thread: Re: "0= if" or simply "if" ???
- Index(es):
Relevant Pages
|