Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #48417

Re: I am afriad

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: I am afriad
Date 2016-06-20 23:51 -0400
Organization A noiseless patient Spider
Message-ID <nkadj7$4ap$1@dont-email.me> (permalink)
References (1 earlier) <10796b24-694d-4913-b363-02ae917fad29@googlegroups.com> <nk9i1f$jc3$1@dont-email.me> <c6cca178-32e2-4515-b65d-3508a444c1d8@googlegroups.com> <nkaa4b$rr6$1@dont-email.me> <c9692328-7937-4b07-9113-8700ea9ffa4f@googlegroups.com>

Show all headers | View raw


On 6/20/2016 11:23 PM, Chris Curl wrote:
> On Monday, June 20, 2016 at 10:51:57 PM UTC-4, rickman wrote:
>> On 6/20/2016 10:03 PM, Chris Curl wrote:
>>> I have been a software developer for 30+ years. Trust me, I know how to
>>> design and build very large scale programs.
>>>
>>> Some languages lend themselves well to a top-down programming style. Forth
>>> does not seem to be a language that fits that model very well.
>>>
>>> Please elaborate how you can write the high level words first, followed by the
>>> supporting words. Forth's whole paradigm is to continually extend the
>>> vocabulary, creating higher and higher level words from the words that already
>>> exist. That is a classic example of bottom up programming.
>>>
>>> What am I missing?
>>
>> The distinction between code and design... as I said before.
>>
>> How do you do top down design in C or any other language?  In Forth you
>> do the same thing.
>>
>> --
>>
>> Rick C
> Do you seriously not understand what I am talking about?
>
> Sure, you may have a good idea where you want to end up, and what the
> last words look like and how they behave, but before you can write those
> words, you have to ALREADY HAVE WRITTEN ALL THE WORDS ON WHICH THOSE WORDS
> DEPEND.
>
> In many other languages, you can write the top level functions first, with
> stubs for the next level down. You can keep going that way until you have
> filled in all the supporting code. In my job where they pay me really good
> money to design and write programs every day, we use C++ and C# primarily,
> and that is how we write our programs.

"Stubs"... are they magical features of every language other than Forth???


> Show me how you do that in Forth.

: Stub_a ( -- ) ;

Or if the stub needs to return a flag...

: Stub_b ( -- flag ) FALSE ;

Or if the stub takes two arguments and returns one result...

: Stub_c ( a b -- c ) drop drop 0 ;

Is that really too hard for you to figure out???

(See Hugh, I *can* write code, lol)

You show me a stub in C or C++ (well,  maybe not C++ since I've not used 
it) and I'll show you the *exact* same stub in Forth!

I have no idea how to even discuss this with you as the issue is so 
transparent.  What sort of road blocks do you have in your mind about 
the capabilities of Forth???

I actually write Forth programs top down if I don't have a clear idea of 
the middle layers.  I typically know the low level interfaces or some 
hardware control stuff and I know what it needs to be at the top level. 
So I start coding the top level so I can then derive my requirements for 
the middle layers (informally of course).  Finally I code the lowest 
layers to support the middle layers and start testing from the bottom up.

Actually, my testing is often done on separate branches from the bottom 
up.  So I design a path down one branch and test it.  Then I design 
another branch and test it.  Eventually I've tested the entire body of 
code together and see if I missed any bugs in the process.

If the decomposition is such that there is code that can be tested on 
the way down, I do that before starting the bottom up testing.  That 
often happens with control loops or various functions that essentially 
are short branches.

But my design and coding process is top down... notice I said "design 
and coding" as they are very different things that I typically integrate 
because my stuff is usually not terribly large.  If I were designing 
larger bodies of code I would likely use more formal requirements 
analysis and design techniques to assure fewer mistakes in the top down 
design process.

I have no idea why you think there are any design and coding methods you 
can't use with Forth.

-- 

Rick C

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I am afriad endlessboomcapitalism@gmail.com - 2016-06-19 22:00 -0700
  Re: I am afriad Chris Curl <ccurl609@gmail.com> - 2016-06-20 05:29 -0700
    Re: I am afriad "Kerr Mudd-John" <admin@127.0.0.1> - 2016-06-20 19:43 -0100
      Re: I am afriad endlessboomcapitalism@gmail.com - 2016-06-20 14:42 -0700
        Re: I am afriad hughaguilar96@gmail.com - 2016-06-20 19:35 -0700
    Re: I am afriad rickman <gnuarm@gmail.com> - 2016-06-20 16:00 -0400
      Re: I am afriad Chris Curl <ccurl609@gmail.com> - 2016-06-20 19:03 -0700
        Re: I am afriad hughaguilar96@gmail.com - 2016-06-20 19:23 -0700
          Re: I am afriad rickman <gnuarm@gmail.com> - 2016-06-20 22:58 -0400
        Re: I am afriad rickman <gnuarm@gmail.com> - 2016-06-20 22:51 -0400
          Re: I am afriad Chris Curl <ccurl609@gmail.com> - 2016-06-20 20:23 -0700
            Re: I am afriad rickman <gnuarm@gmail.com> - 2016-06-20 23:51 -0400
            Re: I am afriad Ron Aaron <rambamist@gmail.com> - 2016-06-21 07:04 +0300
              Re: I am afriad Chris Curl <ccurl609@gmail.com> - 2016-06-21 05:33 -0700
                Re: I am afriad Ron Aaron <rambamist@gmail.com> - 2016-06-21 16:05 +0300
                Re: I am afriad anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-06-21 13:30 +0000
            Re: I am afriad hughaguilar96@gmail.com - 2016-06-20 21:10 -0700
            Re: I am afriad hughaguilar96@gmail.com - 2016-06-20 21:16 -0700
              Re: I am afriad Ron Aaron <rambamist@gmail.com> - 2016-06-21 07:41 +0300
  Re: I am afriad Mark Wills <markwills1970@gmail.com> - 2016-06-21 05:23 -0700
    Re: I am afriad Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-06-21 08:27 -0500
      Re: I am afriad Mark Wills <markwills1970@gmail.com> - 2016-06-21 10:47 -0700
    Re: I am afriad hughaguilar96@gmail.com - 2016-06-21 22:58 -0700
      Re: I am afriad Julian Fondren <julian.fondren@gmail.com> - 2016-06-21 23:51 -0700
        Re: I am afriad Mark Wills <markwills1970@gmail.com> - 2016-06-22 08:06 -0700
      Re: I am afriad Matthias Trute <matthias.trute@gmail.com> - 2016-06-22 06:04 -0700

csiph-web