Re: "0= if" or simply "if" ???



Cesar Rabak wrote:
Jerry Avins escreveu:
Cesar Rabak wrote:
Jerry Avins escreveu:
[snipped]>
I think it's a beginner hangup to write "if x .ne. 0" in BASIC, C, or
Fortran instead of "if x". They mean the same thing and should be
seen that way. Same for Forth.

I think is a good practice that begginers are forced to abandon due
'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.

Jerry, I respect we differ.

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.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
.



Relevant Pages

  • Re: Ruby editing style rules and recommendation?
    ... languages for several reasons. ... I am hoping to stick with Ruby now ... I find this especially helpful for readability. ... Which one is recommended in terms of the editing style? ...
    (comp.lang.ruby)
  • Re: Ping Nick: Why Language Doesnt Really Matter
    ... I am convinced that the fact that languages like C ... pretty much the same when it comes to readability and productivity" is ... Readability is just one factor in productivity, ... availability of libraries, compiler speed, availability of an ...
    (borland.public.delphi.non-technical)
  • Re: Lambda expressions: Dangerous Madness
    ... Jon has an example, reproduced ... it's like SQL and those 'high level' languages that try ... I'd say they greatly add to readability, ... - when you're familiar with them, lambda expressions are *wonderful*. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [dfwPython] A Few More Forrester Survey Questions
    ... Robustness - bugs in Python itself are rare due to maturity from long ... Mature ecosystem of libraries, both cross platform and platform native, ... and good options for accessing libraries in other languages. ... to manage due to readability problems. ...
    (comp.lang.python)